summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng
diff options
context:
space:
mode:
authorSteve Sakoman <steve@sakoman.com>2023-02-03 08:20:53 -1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-13 07:44:09 +0000
commit8d7596c0eb011d153cdce86c51258777556796ca (patch)
tree26a4603c2d2727e58023adbe8563cb5ed7eae664 /meta/recipes-kernel/lttng
parentb952c3f07ae3626dab7a30f2fb0e0f893e8aa6f7 (diff)
downloadpoky-8d7596c0eb011d153cdce86c51258777556796ca.tar.gz
lttng-modules: fix build with 5.4.229 kernel
Fixes: In file included from TOPDIR/tmp/work/qemuarm-poky-linux-gnueabi/lttng-modules/2.11.6-r0/lttng-modules-2.11.6/probes/../probes/define_trace.h:87, from TOPDIR/tmp/work/qemuarm-poky-linux-gnueabi/lttng-modules/2.11.6-r0/lttng-modules-2.11.6/probes/../instrumentation/events/lttng-module/jbd2.h:183, from TOPDIR/tmp/work/qemuarm-poky-linux-gnueabi/lttng-modules/2.11.6-r0/lttng-modules-2.11.6/probes/lttng-probe-jbd2.c:29: TOPDIR/tmp/work/qemuarm-poky-linux-gnueabi/lttng-modules/2.11.6-r0/lttng-modules-2.11.6/probes/../probes/lttng-tracepoint-event-impl.h:130:6: error: conflicting types for 'trace_jbd2_run_stats' 130 | void trace_##_name(_proto); | ^~~~~~ TOPDIR/tmp/work/qemuarm-poky-linux-gnueabi/lttng-modules/2.11.6-r0/lttng-modules-2.11.6/probes/../probes/lttng-tracepoint-event-impl.h:42:2: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP' 42 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(map, name, map, PARAMS(proto), PARAMS(args)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TOPDIR/tmp/work/qemuarm-poky-linux-gnueabi/lttng-modules/2.11.6-r0/lttng-modules-2.11.6/probes/../probes/lttng-tracepoint-event-impl.h:84:2: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_MAP' 84 | LTTNG_TRACEPOINT_EVENT_MAP(name, name, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~ TOPDIR/tmp/work/qemuarm-poky-linux-gnueabi/lttng-modules/2.11.6-r0/lttng-modules-2.11.6/probes/../instrumentation/events/lttng-module/jbd2.h:107:1: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT' 107 | LTTNG_TRACEPOINT_EVENT(jbd2_run_stats, | ^~~~~~~~~~~~~~~~~~~~~~ In file included from TOPDIR/tmp/work-shared/qemuarm/kernel-source/include/trace/events/jbd2.h:9, from TOPDIR/tmp/work/qemuarm-poky-linux-gnueabi/lttng-modules/2.11.6-r0/lttng-modules-2.11.6/probes/lttng-probe-jbd2.c:18: TOPDIR/tmp/work-shared/qemuarm/kernel-source/include/linux/tracepoint.h:243:21: note: previous definition of 'trace_jbd2_run_stats' was here 243 | static inline void trace_##name(proto) \ | ^~~~~~ TOPDIR/tmp/work-shared/qemuarm/kernel-source/include/linux/tracepoint.h:406:2: note: in expansion of macro '__DECLARE_TRACE' 406 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \ | ^~~~~~~~~~~~~~~ TOPDIR/tmp/work-shared/qemuarm/kernel-source/include/linux/tracepoint.h:542:2: note: in expansion of macro 'DECLARE_TRACE' 542 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) | ^~~~~~~~~~~~~ TOPDIR/tmp/work-shared/qemuarm/kernel-source/include/trace/events/jbd2.h:234:1: note: in expansion of macro 'TRACE_EVENT' 234 | TRACE_EVENT(jbd2_run_stats, | ^~~~~~~~~~~ CC [M] TOPDIR/tmp/work/qemuarm-poky-linux-gnueabi/lttng-modules/2.11.6-r0/lttng-modules-2.11.6/probes/lttng-probe-ext4.o Backport from upstream master branch fixes: https://github.com/lttng/lttng-modules/commit/b28830a0dcdf95ec3e6b390b4d032667deaad0c0 https://github.com/lttng/lttng-modules/commit/4fd2615b87b3cac0fd5bdc5fc82db05f6fcfdecf https://github.com/lttng/lttng-modules/commit/612c99eb24bf72f4d47d02025e92de8c35ece14e Note that master branch upstream has restructured the location of header files, so the patches do not apply cleanly. This patch combines the changes in the above commits in the old header location. (From OE-Core rev: 520d957e14be77f73c82a295f685d189381d8f72) Signed-off-by: Steve Sakoman <steve@sakoman.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/fix-jbd2-use-the-correct-print-format.patch147
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules_2.11.9.bb1
2 files changed, 148 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/fix-jbd2-use-the-correct-print-format.patch b/meta/recipes-kernel/lttng/lttng-modules/fix-jbd2-use-the-correct-print-format.patch
new file mode 100644
index 0000000000..b4939188cc
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/fix-jbd2-use-the-correct-print-format.patch
@@ -0,0 +1,147 @@
1fix: jbd2: use the correct print format
2See upstream commit :
3
4 commit d87a7b4c77a997d5388566dd511ca8e6b8e8a0a8
5 Author: Bixuan Cui <cuibixuan@linux.alibaba.com>
6 Date: Tue Oct 11 19:33:44 2022 +0800
7
8 jbd2: use the correct print format
9
10 The print format error was found when using ftrace event:
11 <...>-1406 [000] .... 23599442.895823: jbd2_end_commit: dev 252,8 transaction -1866216965 sync 0 head -1866217368
12 <...>-1406 [000] .... 23599442.896299: jbd2_start_commit: dev 252,8 transaction -1866216964 sync 0
13
14 Use the correct print format for transaction, head and tid.
15
16Change-Id: Ic053f0e0c1e24ebc75bae51d07696aaa5e1c0094
17Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
18Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
19
20Upstream-status: Backport
21Signed-off-by: Steve Sakoman <steve@sakoman.com>
22Note: combines three upstream commits:
23https://github.com/lttng/lttng-modules/commit/b28830a0dcdf95ec3e6b390b4d032667deaad0c0
24https://github.com/lttng/lttng-modules/commit/4fd2615b87b3cac0fd5bdc5fc82db05f6fcfdecf
25https://github.com/lttng/lttng-modules/commit/612c99eb24bf72f4d47d02025e92de8c35ece14e
26
27diff --git a/instrumentation/events/lttng-module/jbd2.h b/instrumentation/events/lttng-module/jbd2.h
28--- a/instrumentation/events/lttng-module/jbd2.h
29+++ b/instrumentation/events/lttng-module/jbd2.h
30@@ -29,6 +29,25 @@ LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint,
31 )
32 )
33
34+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0) \
35+ || LTTNG_KERNEL_RANGE(5,4,229, 5,5,0) \
36+ || LTTNG_KERNEL_RANGE(5,10,163, 5,11,0) \
37+ || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \
38+ || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \
39+ || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0))
40+LTTNG_TRACEPOINT_EVENT_CLASS(jbd2_commit,
41+
42+ TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
43+
44+ TP_ARGS(journal, commit_transaction),
45+
46+ TP_FIELDS(
47+ ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
48+ ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit)
49+ ctf_integer(tid_t, transaction, commit_transaction->t_tid)
50+ )
51+)
52+#else
53 LTTNG_TRACEPOINT_EVENT_CLASS(jbd2_commit,
54
55 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
56@@ -41,6 +60,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(jbd2_commit
57 ctf_integer(int, transaction, commit_transaction->t_tid)
58 )
59 )
60+#endif
61
62 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_start_commit,
63
64@@ -79,6 +99,25 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_com
65 )
66 #endif
67
68+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0) \
69+ || LTTNG_KERNEL_RANGE(5,4,229, 5,5,0) \
70+ || LTTNG_KERNEL_RANGE(5,10,163, 5,11,0) \
71+ || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \
72+ || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \
73+ || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0))
74+LTTNG_TRACEPOINT_EVENT(jbd2_end_commit,
75+ TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
76+
77+ TP_ARGS(journal, commit_transaction),
78+
79+ TP_FIELDS(
80+ ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
81+ ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit)
82+ ctf_integer(tid_t, transaction, commit_transaction->t_tid)
83+ ctf_integer(tid_t, head, journal->j_tail_sequence)
84+ )
85+)
86+#else
87 LTTNG_TRACEPOINT_EVENT(jbd2_end_commit,
88 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
89
90@@ -91,6 +130,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_end_commit,
91 ctf_integer(int, head, journal->j_tail_sequence)
92 )
93 )
94+#endif
95
96 LTTNG_TRACEPOINT_EVENT(jbd2_submit_inode_data,
97 TP_PROTO(struct inode *inode),
98@@ -103,7 +143,48 @@ LTTNG_TRACEPOINT_EVENT(jbd2_submit_inode
99 )
100 )
101
102-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,32))
103+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0) \
104+ || LTTNG_KERNEL_RANGE(5,4,229, 5,5,0) \
105+ || LTTNG_KERNEL_RANGE(5,10,163, 5,11,0) \
106+ || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \
107+ || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \
108+ || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0))
109+LTTNG_TRACEPOINT_EVENT(jbd2_run_stats,
110+ TP_PROTO(dev_t dev, tid_t tid,
111+ struct transaction_run_stats_s *stats),
112+
113+ TP_ARGS(dev, tid, stats),
114+
115+ TP_FIELDS(
116+ ctf_integer(dev_t, dev, dev)
117+ ctf_integer(tid_t, tid, tid)
118+ ctf_integer(unsigned long, wait, stats->rs_wait)
119+ ctf_integer(unsigned long, running, stats->rs_running)
120+ ctf_integer(unsigned long, locked, stats->rs_locked)
121+ ctf_integer(unsigned long, flushing, stats->rs_flushing)
122+ ctf_integer(unsigned long, logging, stats->rs_logging)
123+ ctf_integer(__u32, handle_count, stats->rs_handle_count)
124+ ctf_integer(__u32, blocks, stats->rs_blocks)
125+ ctf_integer(__u32, blocks_logged, stats->rs_blocks_logged)
126+ )
127+)
128+
129+LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint_stats,
130+ TP_PROTO(dev_t dev, tid_t tid,
131+ struct transaction_chp_stats_s *stats),
132+
133+ TP_ARGS(dev, tid, stats),
134+
135+ TP_FIELDS(
136+ ctf_integer(dev_t, dev, dev)
137+ ctf_integer(tid_t, tid, tid)
138+ ctf_integer(unsigned long, chp_time, stats->cs_chp_time)
139+ ctf_integer(__u32, forced_to_close, stats->cs_forced_to_close)
140+ ctf_integer(__u32, written, stats->cs_written)
141+ ctf_integer(__u32, dropped, stats->cs_dropped)
142+ )
143+)
144+#else
145 LTTNG_TRACEPOINT_EVENT(jbd2_run_stats,
146 TP_PROTO(dev_t dev, unsigned long tid,
147 struct transaction_run_stats_s *stats),
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.11.9.bb b/meta/recipes-kernel/lttng/lttng-modules_2.11.9.bb
index d30478c1a1..8e9c44241b 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.11.9.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.11.9.bb
@@ -15,6 +15,7 @@ SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
15 file://0017-fix-random-remove-unused-tracepoints-v5.18.patch \ 15 file://0017-fix-random-remove-unused-tracepoints-v5.18.patch \
16 file://0018-fix-random-remove-unused-tracepoints-v5.10-v5.15.patch \ 16 file://0018-fix-random-remove-unused-tracepoints-v5.10-v5.15.patch \
17 file://0019-fix-random-tracepoints-removed-in-stable-kernels.patch \ 17 file://0019-fix-random-tracepoints-removed-in-stable-kernels.patch \
18 file://fix-jbd2-use-the-correct-print-format.patch \
18 " 19 "
19 20
20SRC_URI[md5sum] = "cfb23ea6bdaf1ad40c7f9ac098b4016d" 21SRC_URI[md5sum] = "cfb23ea6bdaf1ad40c7f9ac098b4016d"