summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch318
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0007-fix-objtool-Rename-frame.h-objtool.h-v5.10.patch88
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0009-fix-btrfs-make-ordered-extent-tracepoint-take-btrfs_.patch179
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0010-fix-ext4-fast-commit-recovery-path-v5.10.patch99
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0012-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch82
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0014-fix-tracepoint-Optimize-using-static_call-v5.10.patch196
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0016-fix-statedump-undefined-symbols-caused-by-incorrect-.patch55
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules_2.12.4.bb (renamed from meta/recipes-kernel/lttng/lttng-modules_2.12.3.bb)9
8 files changed, 1 insertions, 1025 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch b/meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch
deleted file mode 100644
index 956f53d7b7..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch
+++ /dev/null
@@ -1,318 +0,0 @@
1From e13a7d262928984154fcf89feb14098e0cd1ad31 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Tue, 27 Oct 2020 11:42:23 -0400
4Subject: [PATCH 04/11] fix: btrfs: tracepoints: output proper root owner for
5 trace_find_free_extent() (v5.10)
6
7See upstream commit :
8
9 commit 437490fed3b0c9ae21af8f70e0f338d34560842b
10 Author: Qu Wenruo <wqu@suse.com>
11 Date: Tue Jul 28 09:42:49 2020 +0800
12
13 btrfs: tracepoints: output proper root owner for trace_find_free_extent()
14
15 The current trace event always output result like this:
16
17 find_free_extent: root=2(EXTENT_TREE) len=16384 empty_size=0 flags=4(METADATA)
18 find_free_extent: root=2(EXTENT_TREE) len=16384 empty_size=0 flags=4(METADATA)
19 find_free_extent: root=2(EXTENT_TREE) len=8192 empty_size=0 flags=1(DATA)
20 find_free_extent: root=2(EXTENT_TREE) len=8192 empty_size=0 flags=1(DATA)
21 find_free_extent: root=2(EXTENT_TREE) len=4096 empty_size=0 flags=1(DATA)
22 find_free_extent: root=2(EXTENT_TREE) len=4096 empty_size=0 flags=1(DATA)
23
24 T's saying we're allocating data extent for EXTENT tree, which is not
25 even possible.
26
27 It's because we always use EXTENT tree as the owner for
28 trace_find_free_extent() without using the @root from
29 btrfs_reserve_extent().
30
31 This patch will change the parameter to use proper @root for
32 trace_find_free_extent():
33
34 Now it looks much better:
35
36 find_free_extent: root=5(FS_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP)
37 find_free_extent: root=5(FS_TREE) len=8192 empty_size=0 flags=1(DATA)
38 find_free_extent: root=5(FS_TREE) len=16384 empty_size=0 flags=1(DATA)
39 find_free_extent: root=5(FS_TREE) len=4096 empty_size=0 flags=1(DATA)
40 find_free_extent: root=5(FS_TREE) len=8192 empty_size=0 flags=1(DATA)
41 find_free_extent: root=5(FS_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP)
42 find_free_extent: root=7(CSUM_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP)
43 find_free_extent: root=2(EXTENT_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP)
44 find_free_extent: root=1(ROOT_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP)
45
46Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
47Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
48Change-Id: I1d674064d29b31417e2acffdeb735f5052a87032
49
50Upstream-Status: Backport
51
52Signed-off-by: He Zhe <zhe.he@windriver.com>
53---
54 instrumentation/events/lttng-module/btrfs.h | 206 ++++++++++++--------
55 1 file changed, 122 insertions(+), 84 deletions(-)
56
57diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h
58index 7b29008..52fcfd0 100644
59--- a/instrumentation/events/lttng-module/btrfs.h
60+++ b/instrumentation/events/lttng-module/btrfs.h
61@@ -1856,7 +1856,29 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_f
62
63 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
64
65-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
66+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0) || \
67+ LTTNG_KERNEL_RANGE(5,9,6, 5,10,0) || \
68+ LTTNG_KERNEL_RANGE(5,4,78, 5,5,0))
69+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
70+
71+ btrfs_find_free_extent,
72+
73+ TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
74+ u64 data),
75+
76+ TP_ARGS(root, num_bytes, empty_size, data),
77+
78+ TP_FIELDS(
79+ ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
80+ ctf_integer(u64, root_objectid, root->root_key.objectid)
81+ ctf_integer(u64, num_bytes, num_bytes)
82+ ctf_integer(u64, empty_size, empty_size)
83+ ctf_integer(u64, data, data)
84+ )
85+)
86+
87+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
88+
89 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
90
91 btrfs_find_free_extent,
92@@ -1874,6 +1896,105 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
93 )
94 )
95
96+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
97+
98+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
99+
100+ btrfs_find_free_extent,
101+
102+ TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
103+ u64 data),
104+
105+ TP_ARGS(fs_info, num_bytes, empty_size, data),
106+
107+ TP_FIELDS(
108+ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
109+ ctf_integer(u64, num_bytes, num_bytes)
110+ ctf_integer(u64, empty_size, empty_size)
111+ ctf_integer(u64, data, data)
112+ )
113+)
114+
115+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
116+
117+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
118+
119+ btrfs_find_free_extent,
120+
121+ TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
122+ u64 data),
123+
124+ TP_ARGS(fs_info, num_bytes, empty_size, data),
125+
126+ TP_FIELDS(
127+ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
128+ ctf_integer(u64, num_bytes, num_bytes)
129+ ctf_integer(u64, empty_size, empty_size)
130+ ctf_integer(u64, data, data)
131+ )
132+)
133+
134+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
135+
136+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
137+
138+ btrfs_find_free_extent,
139+
140+ TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
141+ u64 data),
142+
143+ TP_ARGS(fs_info, num_bytes, empty_size, data),
144+
145+ TP_FIELDS(
146+ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
147+ ctf_integer(u64, num_bytes, num_bytes)
148+ ctf_integer(u64, empty_size, empty_size)
149+ ctf_integer(u64, data, data)
150+ )
151+)
152+
153+#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
154+ LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
155+ LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
156+ LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
157+
158+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
159+
160+ btrfs_find_free_extent,
161+
162+ TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
163+ u64 data),
164+
165+ TP_ARGS(root, num_bytes, empty_size, data),
166+
167+ TP_FIELDS(
168+ ctf_integer(u64, root_objectid, root->root_key.objectid)
169+ ctf_integer(u64, num_bytes, num_bytes)
170+ ctf_integer(u64, empty_size, empty_size)
171+ ctf_integer(u64, data, data)
172+ )
173+)
174+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
175+
176+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
177+
178+ btrfs_find_free_extent,
179+
180+ TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
181+ u64 data),
182+
183+ TP_ARGS(root, num_bytes, empty_size, data),
184+
185+ TP_FIELDS(
186+ ctf_integer(u64, root_objectid, root->root_key.objectid)
187+ ctf_integer(u64, num_bytes, num_bytes)
188+ ctf_integer(u64, empty_size, empty_size)
189+ ctf_integer(u64, data, data)
190+ )
191+)
192+#endif
193+
194+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
195 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
196
197 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
198@@ -1907,22 +2028,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
199 )
200
201 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
202-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
203-
204- btrfs_find_free_extent,
205-
206- TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
207- u64 data),
208-
209- TP_ARGS(fs_info, num_bytes, empty_size, data),
210-
211- TP_FIELDS(
212- ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
213- ctf_integer(u64, num_bytes, num_bytes)
214- ctf_integer(u64, empty_size, empty_size)
215- ctf_integer(u64, data, data)
216- )
217-)
218
219 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
220
221@@ -1957,22 +2062,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
222 )
223
224 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
225-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
226-
227- btrfs_find_free_extent,
228-
229- TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
230- u64 data),
231-
232- TP_ARGS(fs_info, num_bytes, empty_size, data),
233-
234- TP_FIELDS(
235- ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
236- ctf_integer(u64, num_bytes, num_bytes)
237- ctf_integer(u64, empty_size, empty_size)
238- ctf_integer(u64, data, data)
239- )
240-)
241
242 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
243
244@@ -2011,23 +2100,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
245
246 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
247
248-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
249-
250- btrfs_find_free_extent,
251-
252- TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
253- u64 data),
254-
255- TP_ARGS(fs_info, num_bytes, empty_size, data),
256-
257- TP_FIELDS(
258- ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
259- ctf_integer(u64, num_bytes, num_bytes)
260- ctf_integer(u64, empty_size, empty_size)
261- ctf_integer(u64, data, data)
262- )
263-)
264-
265 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
266
267 TP_PROTO(struct btrfs_fs_info *fs_info,
268@@ -2066,23 +2138,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
269 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
270 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
271
272-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
273-
274- btrfs_find_free_extent,
275-
276- TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
277- u64 data),
278-
279- TP_ARGS(root, num_bytes, empty_size, data),
280-
281- TP_FIELDS(
282- ctf_integer(u64, root_objectid, root->root_key.objectid)
283- ctf_integer(u64, num_bytes, num_bytes)
284- ctf_integer(u64, empty_size, empty_size)
285- ctf_integer(u64, data, data)
286- )
287-)
288-
289 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
290
291 TP_PROTO(const struct btrfs_root *root,
292@@ -2120,23 +2175,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
293
294 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
295
296-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
297-
298- btrfs_find_free_extent,
299-
300- TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
301- u64 data),
302-
303- TP_ARGS(root, num_bytes, empty_size, data),
304-
305- TP_FIELDS(
306- ctf_integer(u64, root_objectid, root->root_key.objectid)
307- ctf_integer(u64, num_bytes, num_bytes)
308- ctf_integer(u64, empty_size, empty_size)
309- ctf_integer(u64, data, data)
310- )
311-)
312-
313 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
314
315 TP_PROTO(struct btrfs_root *root,
316--
3172.17.1
318
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0007-fix-objtool-Rename-frame.h-objtool.h-v5.10.patch b/meta/recipes-kernel/lttng/lttng-modules/0007-fix-objtool-Rename-frame.h-objtool.h-v5.10.patch
deleted file mode 100644
index fde9398394..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0007-fix-objtool-Rename-frame.h-objtool.h-v5.10.patch
+++ /dev/null
@@ -1,88 +0,0 @@
1From 37b9cb0e6cb92181b7a25583849a9d161a558982 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 26 Oct 2020 13:41:02 -0400
4Subject: [PATCH 07/19] fix: objtool: Rename frame.h -> objtool.h (v5.10)
5
6See upstream commit :
7
8 commit 00089c048eb4a8250325efb32a2724fd0da68cce
9 Author: Julien Thierry <jthierry@redhat.com>
10 Date: Fri Sep 4 16:30:25 2020 +0100
11
12 objtool: Rename frame.h -> objtool.h
13
14 Header frame.h is getting more code annotations to help objtool analyze
15 object files.
16
17 Rename the file to objtool.h.
18
19Upstream-Status: Backport
20
21Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
22Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
23Change-Id: Ic2283161bebcbf1e33b72805eb4d2628f4ae3e89
24---
25 lttng-filter-interpreter.c | 2 +-
26 wrapper/{frame.h => objtool.h} | 19 ++++++++++++-------
27 2 files changed, 13 insertions(+), 8 deletions(-)
28 rename wrapper/{frame.h => objtool.h} (50%)
29
30diff --git a/lttng-filter-interpreter.c b/lttng-filter-interpreter.c
31index 21169f01..5d572437 100644
32--- a/lttng-filter-interpreter.c
33+++ b/lttng-filter-interpreter.c
34@@ -8,7 +8,7 @@
35 */
36
37 #include <wrapper/uaccess.h>
38-#include <wrapper/frame.h>
39+#include <wrapper/objtool.h>
40 #include <wrapper/types.h>
41 #include <linux/swab.h>
42
43diff --git a/wrapper/frame.h b/wrapper/objtool.h
44similarity index 50%
45rename from wrapper/frame.h
46rename to wrapper/objtool.h
47index 6e6dc811..3b997cae 100644
48--- a/wrapper/frame.h
49+++ b/wrapper/objtool.h
50@@ -1,18 +1,23 @@
51-/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
52+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
53 *
54- * wrapper/frame.h
55+ * wrapper/objtool.h
56 *
57 * Copyright (C) 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
58 */
59
60-#ifndef _LTTNG_WRAPPER_FRAME_H
61-#define _LTTNG_WRAPPER_FRAME_H
62+#ifndef _LTTNG_WRAPPER_OBJTOOL_H
63+#define _LTTNG_WRAPPER_OBJTOOL_H
64
65 #include <linux/version.h>
66
67-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
68-
69+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
70+#include <linux/objtool.h>
71+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
72 #include <linux/frame.h>
73+#endif
74+
75+
76+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
77
78 #define LTTNG_STACK_FRAME_NON_STANDARD(func) \
79 STACK_FRAME_NON_STANDARD(func)
80@@ -23,4 +28,4 @@
81
82 #endif
83
84-#endif /* _LTTNG_WRAPPER_FRAME_H */
85+#endif /* _LTTNG_WRAPPER_OBJTOOL_H */
86--
872.19.1
88
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0009-fix-btrfs-make-ordered-extent-tracepoint-take-btrfs_.patch b/meta/recipes-kernel/lttng/lttng-modules/0009-fix-btrfs-make-ordered-extent-tracepoint-take-btrfs_.patch
deleted file mode 100644
index bc87c7174e..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0009-fix-btrfs-make-ordered-extent-tracepoint-take-btrfs_.patch
+++ /dev/null
@@ -1,179 +0,0 @@
1From ddad4e82bc2cc48c0eb56d2daf69409026e8b31a Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Tue, 27 Oct 2020 12:10:05 -0400
4Subject: [PATCH 09/19] fix: btrfs: make ordered extent tracepoint take
5 btrfs_inode (v5.10)
6
7See upstream commit :
8
9 commit acbf1dd0fcbd10c67826a19958f55a053b32f532
10 Author: Nikolay Borisov <nborisov@suse.com>
11 Date: Mon Aug 31 14:42:40 2020 +0300
12
13 btrfs: make ordered extent tracepoint take btrfs_inode
14
15Upstream-Status: Backport
16
17Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
18Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
19Change-Id: I096d0801ffe0ad826cfe414cdd1c0857cbd2b624
20---
21 instrumentation/events/lttng-module/btrfs.h | 120 +++++++++++++++-----
22 1 file changed, 90 insertions(+), 30 deletions(-)
23
24diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h
25index 52fcfd0d..d47f3280 100644
26--- a/instrumentation/events/lttng-module/btrfs.h
27+++ b/instrumentation/events/lttng-module/btrfs.h
28@@ -346,7 +346,29 @@ LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
29 )
30 #endif
31
32-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
33+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
34+LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
35+
36+ TP_PROTO(const struct btrfs_inode *inode,
37+ const struct btrfs_ordered_extent *ordered),
38+
39+ TP_ARGS(inode, ordered),
40+
41+ TP_FIELDS(
42+ ctf_array(u8, fsid, inode->root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
43+ ctf_integer(ino_t, ino, btrfs_ino(inode))
44+ ctf_integer(u64, file_offset, ordered->file_offset)
45+ ctf_integer(u64, start, ordered->disk_bytenr)
46+ ctf_integer(u64, len, ordered->num_bytes)
47+ ctf_integer(u64, disk_len, ordered->disk_num_bytes)
48+ ctf_integer(u64, bytes_left, ordered->bytes_left)
49+ ctf_integer(unsigned long, flags, ordered->flags)
50+ ctf_integer(int, compress_type, ordered->compress_type)
51+ ctf_integer(int, refs, refcount_read(&ordered->refs))
52+ ctf_integer(u64, root_objectid, inode->root->root_key.objectid)
53+ )
54+)
55+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
56 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
57
58 TP_PROTO(const struct inode *inode,
59@@ -458,7 +480,39 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
60 )
61 #endif
62
63-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
64+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
65+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
66+
67+ TP_PROTO(const struct btrfs_inode *inode,
68+ const struct btrfs_ordered_extent *ordered),
69+
70+ TP_ARGS(inode, ordered)
71+)
72+
73+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
74+
75+ TP_PROTO(const struct btrfs_inode *inode,
76+ const struct btrfs_ordered_extent *ordered),
77+
78+ TP_ARGS(inode, ordered)
79+)
80+
81+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
82+
83+ TP_PROTO(const struct btrfs_inode *inode,
84+ const struct btrfs_ordered_extent *ordered),
85+
86+ TP_ARGS(inode, ordered)
87+)
88+
89+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
90+
91+ TP_PROTO(const struct btrfs_inode *inode,
92+ const struct btrfs_ordered_extent *ordered),
93+
94+ TP_ARGS(inode, ordered)
95+)
96+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
97 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
98 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
99 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
100@@ -494,7 +548,41 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
101
102 TP_ARGS(inode, ordered)
103 )
104+#else
105+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
106+
107+ TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
108+
109+ TP_ARGS(inode, ordered)
110+)
111+
112+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
113+
114+ TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
115+
116+ TP_ARGS(inode, ordered)
117+)
118+
119+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
120+
121+ TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
122+
123+ TP_ARGS(inode, ordered)
124+)
125
126+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
127+
128+ TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
129+
130+ TP_ARGS(inode, ordered)
131+)
132+#endif
133+
134+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
135+ LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
136+ LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
137+ LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
138+ LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
139 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
140
141 TP_PROTO(const struct page *page, const struct inode *inode,
142@@ -563,34 +651,6 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
143 )
144 )
145 #else
146-LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
147-
148- TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
149-
150- TP_ARGS(inode, ordered)
151-)
152-
153-LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
154-
155- TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
156-
157- TP_ARGS(inode, ordered)
158-)
159-
160-LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
161-
162- TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
163-
164- TP_ARGS(inode, ordered)
165-)
166-
167-LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
168-
169- TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
170-
171- TP_ARGS(inode, ordered)
172-)
173-
174 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
175
176 TP_PROTO(struct page *page, struct inode *inode,
177--
1782.19.1
179
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0010-fix-ext4-fast-commit-recovery-path-v5.10.patch b/meta/recipes-kernel/lttng/lttng-modules/0010-fix-ext4-fast-commit-recovery-path-v5.10.patch
deleted file mode 100644
index fb00a44b31..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0010-fix-ext4-fast-commit-recovery-path-v5.10.patch
+++ /dev/null
@@ -1,99 +0,0 @@
1From a28235f8ffa3c961640a835686dddb5ca600dfaf Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 26 Oct 2020 17:03:23 -0400
4Subject: [PATCH 10/19] fix: ext4: fast commit recovery path (v5.10)
5
6See upstream commit :
7
8 commit 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2
9 Author: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
10 Date: Thu Oct 15 13:37:59 2020 -0700
11
12 ext4: fast commit recovery path
13
14 This patch adds fast commit recovery path support for Ext4 file
15 system. We add several helper functions that are similar in spirit to
16 e2fsprogs journal recovery path handlers. Example of such functions
17 include - a simple block allocator, idempotent block bitmap update
18 function etc. Using these routines and the fast commit log in the fast
19 commit area, the recovery path (ext4_fc_replay()) performs fast commit
20 log recovery.
21
22Upstream-Status: Backport
23
24Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
25Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
26Change-Id: Ia65cf44e108f2df0b458f0d335f33a8f18f50baa
27---
28 instrumentation/events/lttng-module/ext4.h | 41 ++++++++++++++++++++++
29 1 file changed, 41 insertions(+)
30
31diff --git a/instrumentation/events/lttng-module/ext4.h b/instrumentation/events/lttng-module/ext4.h
32index b172c8d9..6e74abad 100644
33--- a/instrumentation/events/lttng-module/ext4.h
34+++ b/instrumentation/events/lttng-module/ext4.h
35@@ -1274,6 +1274,18 @@ LTTNG_TRACEPOINT_EVENT(ext4_ext_load_extent,
36 )
37 )
38
39+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
40+LTTNG_TRACEPOINT_EVENT(ext4_load_inode,
41+ TP_PROTO(struct super_block *sb, unsigned long ino),
42+
43+ TP_ARGS(sb, ino),
44+
45+ TP_FIELDS(
46+ ctf_integer(dev_t, dev, sb->s_dev)
47+ ctf_integer(ino_t, ino, ino)
48+ )
49+)
50+#else
51 LTTNG_TRACEPOINT_EVENT(ext4_load_inode,
52 TP_PROTO(struct inode *inode),
53
54@@ -1284,6 +1296,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_load_inode,
55 ctf_integer(ino_t, ino, inode->i_ino)
56 )
57 )
58+#endif
59
60 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
61
62@@ -1895,6 +1908,34 @@ LTTNG_TRACEPOINT_EVENT(ext4_es_shrink_exit,
63
64 #endif
65
66+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
67+LTTNG_TRACEPOINT_EVENT(ext4_fc_replay_scan,
68+ TP_PROTO(struct super_block *sb, int error, int off),
69+
70+ TP_ARGS(sb, error, off),
71+
72+ TP_FIELDS(
73+ ctf_integer(dev_t, dev, sb->s_dev)
74+ ctf_integer(int, error, error)
75+ ctf_integer(int, off, off)
76+ )
77+)
78+
79+LTTNG_TRACEPOINT_EVENT(ext4_fc_replay,
80+ TP_PROTO(struct super_block *sb, int tag, int ino, int priv1, int priv2),
81+
82+ TP_ARGS(sb, tag, ino, priv1, priv2),
83+
84+ TP_FIELDS(
85+ ctf_integer(dev_t, dev, sb->s_dev)
86+ ctf_integer(int, tag, tag)
87+ ctf_integer(int, ino, ino)
88+ ctf_integer(int, priv1, priv1)
89+ ctf_integer(int, priv2, priv2)
90+ )
91+)
92+#endif
93+
94 #endif /* LTTNG_TRACE_EXT4_H */
95
96 /* This part must be outside protection */
97--
982.19.1
99
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0012-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch b/meta/recipes-kernel/lttng/lttng-modules/0012-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch
deleted file mode 100644
index 8651bded99..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0012-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch
+++ /dev/null
@@ -1,82 +0,0 @@
1From e30866f96b3ab02639f429e4bd34e59b3a336579 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 26 Oct 2020 14:28:35 -0400
4Subject: [PATCH 12/19] fix: kvm: x86/mmu: Add TDP MMU PF handler (v5.10)
5
6See upstream commit :
7
8 commit bb18842e21111a979e2e0e1c5d85c09646f18d51
9 Author: Ben Gardon <bgardon@google.com>
10 Date: Wed Oct 14 11:26:50 2020 -0700
11
12 kvm: x86/mmu: Add TDP MMU PF handler
13
14 Add functions to handle page faults in the TDP MMU. These page faults
15 are currently handled in much the same way as the x86 shadow paging
16 based MMU, however the ordering of some operations is slightly
17 different. Future patches will add eager NX splitting, a fast page fault
18 handler, and parallel page faults.
19
20 Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell
21 machine. This series introduced no new failures.
22
23Upstream-Status: Backport
24
25Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
26Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
27Change-Id: Ie56959cb6c77913d2f1188b0ca15da9114623a4e
28---
29 .../lttng-module/arch/x86/kvm/mmutrace.h | 20 ++++++++++++++++++-
30 probes/lttng-probe-kvm-x86-mmu.c | 5 +++++
31 2 files changed, 24 insertions(+), 1 deletion(-)
32
33diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
34index e5470400..86717835 100644
35--- a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
36+++ b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
37@@ -163,7 +163,25 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kvm_mmu_page_class, kvm_mmu_prepare_zap_page,
38 TP_ARGS(sp)
39 )
40
41-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
42+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
43+
44+LTTNG_TRACEPOINT_EVENT_MAP(
45+ mark_mmio_spte,
46+
47+ kvm_mmu_mark_mmio_spte,
48+
49+ TP_PROTO(u64 *sptep, gfn_t gfn, u64 spte),
50+ TP_ARGS(sptep, gfn, spte),
51+
52+ TP_FIELDS(
53+ ctf_integer_hex(void *, sptep, sptep)
54+ ctf_integer(gfn_t, gfn, gfn)
55+ ctf_integer(unsigned, access, spte & ACC_ALL)
56+ ctf_integer(unsigned int, gen, get_mmio_spte_generation(spte))
57+ )
58+)
59+
60+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
61
62 LTTNG_TRACEPOINT_EVENT_MAP(
63 mark_mmio_spte,
64diff --git a/probes/lttng-probe-kvm-x86-mmu.c b/probes/lttng-probe-kvm-x86-mmu.c
65index 8f981865..5043c776 100644
66--- a/probes/lttng-probe-kvm-x86-mmu.c
67+++ b/probes/lttng-probe-kvm-x86-mmu.c
68@@ -31,6 +31,11 @@
69 #include <../../arch/x86/kvm/mmutrace.h>
70 #endif
71
72+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
73+#include <../arch/x86/kvm/mmu.h>
74+#include <../arch/x86/kvm/mmu/spte.h>
75+#endif
76+
77 #undef TRACE_INCLUDE_PATH
78 #undef TRACE_INCLUDE_FILE
79
80--
812.19.1
82
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0014-fix-tracepoint-Optimize-using-static_call-v5.10.patch b/meta/recipes-kernel/lttng/lttng-modules/0014-fix-tracepoint-Optimize-using-static_call-v5.10.patch
deleted file mode 100644
index 5892a408b3..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0014-fix-tracepoint-Optimize-using-static_call-v5.10.patch
+++ /dev/null
@@ -1,196 +0,0 @@
1From bb346792c2cb6995ffc08d2084121935c6384865 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 26 Oct 2020 17:09:05 -0400
4Subject: [PATCH 14/19] fix: tracepoint: Optimize using static_call() (v5.10)
5
6See upstream commit :
7
8 commit d25e37d89dd2f41d7acae0429039d2f0ae8b4a07
9 Author: Steven Rostedt (VMware) <rostedt@goodmis.org>
10 Date: Tue Aug 18 15:57:52 2020 +0200
11
12 tracepoint: Optimize using static_call()
13
14 Currently the tracepoint site will iterate a vector and issue indirect
15 calls to however many handlers are registered (ie. the vector is
16 long).
17
18 Using static_call() it is possible to optimize this for the common
19 case of only having a single handler registered. In this case the
20 static_call() can directly call this handler. Otherwise, if the vector
21 is longer than 1, call a function that iterates the whole vector like
22 the current code.
23
24Upstream-Status: Backport
25
26Change-Id: I739dd84d62cc1a821b8bd8acff74fa29aa25d22f
27Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
28Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
29---
30 lttng-statedump-impl.c | 80 +++++++++++++++++++++++++++++++--------
31 probes/lttng.c | 7 +++-
32 tests/probes/lttng-test.c | 7 +++-
33 wrapper/tracepoint.h | 8 ++++
34 4 files changed, 84 insertions(+), 18 deletions(-)
35
36diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c
37index a6fa71a5..67ecd33c 100644
38--- a/lttng-statedump-impl.c
39+++ b/lttng-statedump-impl.c
40@@ -55,26 +55,76 @@
41 #define LTTNG_INSTRUMENTATION
42 #include <instrumentation/events/lttng-module/lttng-statedump.h>
43
44-DEFINE_TRACE(lttng_statedump_block_device);
45-DEFINE_TRACE(lttng_statedump_end);
46-DEFINE_TRACE(lttng_statedump_interrupt);
47-DEFINE_TRACE(lttng_statedump_file_descriptor);
48-DEFINE_TRACE(lttng_statedump_start);
49-DEFINE_TRACE(lttng_statedump_process_state);
50-DEFINE_TRACE(lttng_statedump_process_pid_ns);
51+LTTNG_DEFINE_TRACE(lttng_statedump_block_device,
52+ TP_PROTO(struct lttng_session *session,
53+ dev_t dev, const char *diskname),
54+ TP_ARGS(session, dev, diskname));
55+
56+LTTNG_DEFINE_TRACE(lttng_statedump_end,
57+ TP_PROTO(struct lttng_session *session),
58+ TP_ARGS(session));
59+
60+LTTNG_DEFINE_TRACE(lttng_statedump_interrupt,
61+ TP_PROTO(struct lttng_session *session,
62+ unsigned int irq, const char *chip_name,
63+ struct irqaction *action),
64+ TP_ARGS(session, irq, chip_name, action));
65+
66+LTTNG_DEFINE_TRACE(lttng_statedump_file_descriptor,
67+ TP_PROTO(struct lttng_session *session,
68+ struct files_struct *files,
69+ int fd, const char *filename,
70+ unsigned int flags, fmode_t fmode),
71+ TP_ARGS(session, files, fd, filename, flags, fmode));
72+
73+LTTNG_DEFINE_TRACE(lttng_statedump_start,
74+ TP_PROTO(struct lttng_session *session),
75+ TP_ARGS(session));
76+
77+LTTNG_DEFINE_TRACE(lttng_statedump_process_state,
78+ TP_PROTO(struct lttng_session *session,
79+ struct task_struct *p,
80+ int type, int mode, int submode, int status,
81+ struct files_struct *files),
82+ TP_ARGS(session, p, type, mode, submode, status, files));
83+
84+LTTNG_DEFINE_TRACE(lttng_statedump_process_pid_ns,
85+ TP_PROTO(struct lttng_session *session,
86+ struct task_struct *p,
87+ struct pid_namespace *pid_ns),
88+ TP_ARGS(session, p, pid_ns));
89+
90 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
91-DEFINE_TRACE(lttng_statedump_process_cgroup_ns);
92+LTTNG_DEFINE_TRACE(lttng_statedump_process_cgroup_ns,
93+ TP_PROTO(struct lttng_session *session,
94+ struct task_struct *p,
95+ struct cgroup_namespace *cgroup_ns),
96+ TP_ARGS(session, p, cgroup_ns));
97 #endif
98-DEFINE_TRACE(lttng_statedump_process_ipc_ns);
99+
100+LTTNG_DEFINE_TRACE(lttng_statedump_process_ipc_ns,
101+ TP_PROTO(struct lttng_session *session,
102+ struct task_struct *p,
103+ struct ipc_namespace *ipc_ns),
104+ TP_ARGS(session, p, ipc_ns));
105+
106 #ifndef LTTNG_MNT_NS_MISSING_HEADER
107-DEFINE_TRACE(lttng_statedump_process_mnt_ns);
108+LTTNG_DEFINE_TRACE(lttng_statedump_process_mnt_ns,
109+ TP_PROTO(struct lttng_session *session,
110+ struct task_struct *p,
111+ struct mnt_namespace *mnt_ns),
112+ TP_ARGS(session, p, mnt_ns));
113 #endif
114-DEFINE_TRACE(lttng_statedump_process_net_ns);
115-DEFINE_TRACE(lttng_statedump_process_user_ns);
116-DEFINE_TRACE(lttng_statedump_process_uts_ns);
117-DEFINE_TRACE(lttng_statedump_network_interface);
118+
119+LTTNG_DEFINE_TRACE(lttng_statedump_network_interface,
120+ TP_PROTO(struct lttng_session *session,
121+ struct net_device *dev, struct in_ifaddr *ifa),
122+ TP_ARGS(session, dev, ifa));
123+
124 #ifdef LTTNG_HAVE_STATEDUMP_CPU_TOPOLOGY
125-DEFINE_TRACE(lttng_statedump_cpu_topology);
126+LTTNG_DEFINE_TRACE(lttng_statedump_cpu_topology,
127+ TP_PROTO(struct lttng_session *session, struct cpuinfo_x86 *c),
128+ TP_ARGS(session, c));
129 #endif
130
131 struct lttng_fd_ctx {
132diff --git a/probes/lttng.c b/probes/lttng.c
133index 05bc1388..7ddaa69f 100644
134--- a/probes/lttng.c
135+++ b/probes/lttng.c
136@@ -8,7 +8,7 @@
137 */
138
139 #include <linux/module.h>
140-#include <linux/tracepoint.h>
141+#include <wrapper/tracepoint.h>
142 #include <linux/uaccess.h>
143 #include <linux/gfp.h>
144 #include <linux/fs.h>
145@@ -32,7 +32,10 @@
146 #define LTTNG_LOGGER_COUNT_MAX 1024
147 #define LTTNG_LOGGER_FILE "lttng-logger"
148
149-DEFINE_TRACE(lttng_logger);
150+LTTNG_DEFINE_TRACE(lttng_logger,
151+ PARAMS(const char __user *text, size_t len),
152+ PARAMS(text, len)
153+);
154
155 static struct proc_dir_entry *lttng_logger_dentry;
156
157diff --git a/tests/probes/lttng-test.c b/tests/probes/lttng-test.c
158index b450e7d7..a4fa0645 100644
159--- a/tests/probes/lttng-test.c
160+++ b/tests/probes/lttng-test.c
161@@ -25,7 +25,12 @@
162 #define LTTNG_INSTRUMENTATION
163 #include <instrumentation/events/lttng-module/lttng-test.h>
164
165-DEFINE_TRACE(lttng_test_filter_event);
166+LTTNG_DEFINE_TRACE(lttng_test_filter_event,
167+ PARAMS(int anint, int netint, long *values,
168+ char *text, size_t textlen,
169+ char *etext, uint32_t * net_values),
170+ PARAMS(anint, netint, values, text, textlen, etext, net_values)
171+);
172
173 #define LTTNG_TEST_FILTER_EVENT_FILE "lttng-test-filter-event"
174
175diff --git a/wrapper/tracepoint.h b/wrapper/tracepoint.h
176index c4ba0123..bc19d8c1 100644
177--- a/wrapper/tracepoint.h
178+++ b/wrapper/tracepoint.h
179@@ -14,6 +14,14 @@
180 #include <linux/tracepoint.h>
181 #include <linux/module.h>
182
183+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
184+#define LTTNG_DEFINE_TRACE(name, proto, args) \
185+ DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
186+#else
187+#define LTTNG_DEFINE_TRACE(name, proto, args) \
188+ DEFINE_TRACE(name)
189+#endif
190+
191 #ifndef HAVE_KABI_2635_TRACEPOINT
192
193 #define kabi_2635_tracepoint_probe_register tracepoint_probe_register
194--
1952.19.1
196
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0016-fix-statedump-undefined-symbols-caused-by-incorrect-.patch b/meta/recipes-kernel/lttng/lttng-modules/0016-fix-statedump-undefined-symbols-caused-by-incorrect-.patch
deleted file mode 100644
index e848e16f59..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0016-fix-statedump-undefined-symbols-caused-by-incorrect-.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1From 31f8bf794172102e9758928b481856c4a8800a7f Mon Sep 17 00:00:00 2001
2From: He Zhe <zhe.he@windriver.com>
3Date: Mon, 23 Nov 2020 18:14:25 +0800
4Subject: [PATCH 16/19] fix: statedump: undefined symbols caused by incorrect
5 patch backport
6
7bb346792c2cb ("fix: tracepoint: Optimize using static_call() (v5.10)")
8misses three definitions and causes the following build failures.
9
10ERROR: "__tracepoint_lttng_statedump_process_net_ns" [lttng-statedump.ko] undefined!
11ERROR: "__tracepoint_lttng_statedump_process_user_ns" [lttng-statedump.ko] undefined!
12ERROR: "__tracepoint_lttng_statedump_process_uts_ns" [lttng-statedump.ko] undefined!
13
14Fixes: #1290
15
16Upstream-Status: Backport
17
18Signed-off-by: He Zhe <zhe.he@windriver.com>
19Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
20---
21 lttng-statedump-impl.c | 18 ++++++++++++++++++
22 1 file changed, 18 insertions(+)
23
24diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c
25index 67ecd33c..cf803a73 100644
26--- a/lttng-statedump-impl.c
27+++ b/lttng-statedump-impl.c
28@@ -116,6 +116,24 @@ LTTNG_DEFINE_TRACE(lttng_statedump_process_mnt_ns,
29 TP_ARGS(session, p, mnt_ns));
30 #endif
31
32+LTTNG_DEFINE_TRACE(lttng_statedump_process_net_ns,
33+ TP_PROTO(struct lttng_session *session,
34+ struct task_struct *p,
35+ struct net *net_ns),
36+ TP_ARGS(session, p, net_ns));
37+
38+LTTNG_DEFINE_TRACE(lttng_statedump_process_user_ns,
39+ TP_PROTO(struct lttng_session *session,
40+ struct task_struct *p,
41+ struct user_namespace *user_ns),
42+ TP_ARGS(session, p, user_ns));
43+
44+LTTNG_DEFINE_TRACE(lttng_statedump_process_uts_ns,
45+ TP_PROTO(struct lttng_session *session,
46+ struct task_struct *p,
47+ struct uts_namespace *uts_ns),
48+ TP_ARGS(session, p, uts_ns));
49+
50 LTTNG_DEFINE_TRACE(lttng_statedump_network_interface,
51 TP_PROTO(struct lttng_session *session,
52 struct net_device *dev, struct in_ifaddr *ifa),
53--
542.19.1
55
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.12.3.bb b/meta/recipes-kernel/lttng/lttng-modules_2.12.4.bb
index 3515e4f51e..3d4e5f5c75 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.12.3.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.12.4.bb
@@ -11,16 +11,9 @@ include lttng-platforms.inc
11SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ 11SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
12 file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \ 12 file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
13 file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \ 13 file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
14 file://0001-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch \
15 file://0007-fix-objtool-Rename-frame.h-objtool.h-v5.10.patch \
16 file://0009-fix-btrfs-make-ordered-extent-tracepoint-take-btrfs_.patch \
17 file://0010-fix-ext4-fast-commit-recovery-path-v5.10.patch \
18 file://0012-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch \
19 file://0014-fix-tracepoint-Optimize-using-static_call-v5.10.patch \
20 file://0016-fix-statedump-undefined-symbols-caused-by-incorrect-.patch \
21 " 14 "
22 15
23SRC_URI[sha256sum] = "673ef85c9f03e9b8fed10795e09d4e68add39404b70068d08b10f7b85754d7f0" 16SRC_URI[sha256sum] = "fe66400fa1b85bff1b9ae24419c74e3bb7d358d643eade0594d81b48bd190688"
24 17
25export INSTALL_MOD_DIR="kernel/lttng-modules" 18export INSTALL_MOD_DIR="kernel/lttng-modules"
26 19