summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng
diff options
context:
space:
mode:
authorHe Zhe <zhe.he@windriver.com>2018-07-10 18:03:42 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-18 10:18:41 +0100
commit05940897063ca9de93a16294b685645f8ad37f76 (patch)
tree14accd6ed08127522d2679a79676d05be738ff87 /meta/recipes-kernel/lttng
parentba598c7db375364a09cbb159092327c322751a97 (diff)
downloadpoky-05940897063ca9de93a16294b685645f8ad37f76.tar.gz
lttng-modules: Fix do_compile failure for btrfs related tracepoints
Building lttng-modules with linux-yocto-dev will cause do_compile failure: lttng-modules/2.10.6-r0/lttng-modules-2.10.6/probes/../probes/lttng-tracepoint-event-impl.h:143:6: error: conflicting types for 'trace_btrfs_reserve_extent' void trace_##_name(_proto); ^~~~~~ The following commit from latest mainline kernel changes some btrfs functions' prototype. 3dca5c942dac60164e6a6e89172f25b86af07ce7 "btrfs: trace: Remove unnecessary fs_info parameter for btrfs__reserve_extent event class" This patch backports a commit from upstream to meet the above changes. 51ab0b1da29354375a19f865abcd233dd2178295 "Fix: btrfs: Remove unnecessary fs_info parameter" (From OE-Core rev: c1daa5c0b89cdfab15d2fa093b021b2ce0937dad) Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/lttng')
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0001-Fix-btrfs-Remove-unnecessary-fs_info-parameter.patch116
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules_2.10.6.bb1
2 files changed, 117 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-btrfs-Remove-unnecessary-fs_info-parameter.patch b/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-btrfs-Remove-unnecessary-fs_info-parameter.patch
new file mode 100644
index 0000000000..0fe4ee8294
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-btrfs-Remove-unnecessary-fs_info-parameter.patch
@@ -0,0 +1,116 @@
1From 51ab0b1da29354375a19f865abcd233dd2178295 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 18 Jun 2018 14:53:19 -0400
4Subject: [PATCH] Fix: btrfs: Remove unnecessary fs_info parameter
5
6See upstream commit:
7
8 commit 3dca5c942dac60164e6a6e89172f25b86af07ce7
9 Author: Qu Wenruo <wqu@suse.com>
10 Date: Thu Apr 26 14:24:25 2018 +0800
11
12 btrfs: trace: Remove unnecessary fs_info parameter for btrfs__reserve_extent event class
13
14 fs_info can be extracted from btrfs_block_group_cache, and all
15 btrfs_block_group_cache is created by btrfs_create_block_group_cache()
16 with fs_info initialized, no need to worry about NULL pointer
17 dereference.
18
19Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
20Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
21Upstream-Status: Backport
22Signed-off-by: He Zhe <zhe.he@windriver.com>
23---
24 instrumentation/events/lttng-module/btrfs.h | 54 ++++++++++++++++++++++++++++-
25 1 file changed, 53 insertions(+), 1 deletion(-)
26
27diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h
28index 75cc73b..fd1b6b8 100644
29--- a/instrumentation/events/lttng-module/btrfs.h
30+++ b/instrumentation/events/lttng-module/btrfs.h
31@@ -1658,8 +1658,57 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_f
32
33 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
34
35-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
36+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
37+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
38+
39+ btrfs_find_free_extent,
40+
41+ TP_PROTO(const struct btrfs_fs_info *info, u64 num_bytes, u64 empty_size,
42+ u64 data),
43+
44+ TP_ARGS(info, num_bytes, empty_size, data),
45+
46+ TP_FIELDS(
47+ ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE)
48+ ctf_integer(u64, num_bytes, num_bytes)
49+ ctf_integer(u64, empty_size, empty_size)
50+ ctf_integer(u64, data, data)
51+ )
52+)
53+
54+LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
55+
56+ TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
57+ u64 len),
58+
59+ TP_ARGS(block_group, start, len),
60+
61+ TP_FIELDS(
62+ ctf_array(u8, fsid, block_group->fs_info->fsid, BTRFS_UUID_SIZE)
63+ ctf_integer(u64, bg_objectid, block_group->key.objectid)
64+ ctf_integer(u64, flags, block_group->flags)
65+ ctf_integer(u64, start, start)
66+ ctf_integer(u64, len, len)
67+ )
68+)
69+
70+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
71+
72+ TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
73+ u64 len),
74+
75+ TP_ARGS(block_group, start, len)
76+)
77+
78+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
79+
80+ TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
81+ u64 len),
82+
83+ TP_ARGS(block_group, start, len)
84+)
85
86+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
87 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
88
89 btrfs_find_free_extent,
90@@ -1670,6 +1719,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
91 TP_ARGS(info, num_bytes, empty_size, data),
92
93 TP_FIELDS(
94+ ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE)
95 ctf_integer(u64, num_bytes, num_bytes)
96 ctf_integer(u64, empty_size, empty_size)
97 ctf_integer(u64, data, data)
98@@ -1685,6 +1735,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
99 TP_ARGS(info, block_group, start, len),
100
101 TP_FIELDS(
102+ ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE)
103 ctf_integer(u64, bg_objectid, block_group->key.objectid)
104 ctf_integer(u64, flags, block_group->flags)
105 ctf_integer(u64, start, start)
106@@ -1722,6 +1773,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
107 TP_ARGS(info, num_bytes, empty_size, data),
108
109 TP_FIELDS(
110+ ctf_array(u8, fsid, info->fsid, BTRFS_UUID_SIZE)
111 ctf_integer(u64, num_bytes, num_bytes)
112 ctf_integer(u64, empty_size, empty_size)
113 ctf_integer(u64, data, data)
114--
1152.13.3
116
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.10.6.bb b/meta/recipes-kernel/lttng/lttng-modules_2.10.6.bb
index 6146966894..d9d5588f9a 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.10.6.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.10.6.bb
@@ -14,6 +14,7 @@ COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm).*-linux'
14SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ 14SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
15 file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \ 15 file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
16 file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \ 16 file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
17 file://0001-Fix-btrfs-Remove-unnecessary-fs_info-parameter.patch \
17" 18"
18 19
19SRC_URI[md5sum] = "8110099f4615fc89a74ffe9189b56cfc" 20SRC_URI[md5sum] = "8110099f4615fc89a74ffe9189b56cfc"