summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/lttng')
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0001-fix-strncpy-equals-destination-size-warning.patch42
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0002-fix-objtool-Rename-frame.h-objtool.h-v5.10.patch88
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch316
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0004-fix-btrfs-make-ordered-extent-tracepoint-take-btrfs_.patch179
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0005-fix-ext4-fast-commit-recovery-path-v5.10.patch91
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0006-fix-KVM-x86-Add-intr-vectoring-info-and-error-code-t.patch124
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0007-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch82
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0008-fix-KVM-x86-mmu-Return-unique-RET_PF_-values-if-the-.patch71
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0009-fix-tracepoint-Optimize-using-static_call-v5.10.patch155
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0010-fix-include-order-for-older-kernels.patch31
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0011-Add-release-maintainer-script.patch59
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0012-Improve-the-release-script.patch173
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0013-fix-backport-of-fix-ext4-fast-commit-recovery-path-v.patch32
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0014-Revert-fix-include-order-for-older-kernels.patch32
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0015-fix-backport-of-fix-tracepoint-Optimize-using-static.patch46
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0016-fix-adjust-version-range-for-trace_find_free_extent.patch30
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0017-fix-random-remove-unused-tracepoints-v5.18.patch46
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0018-fix-random-remove-unused-tracepoints-v5.10-v5.15.patch45
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0019-fix-random-tracepoints-removed-in-stable-kernels.patch51
-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.bb (renamed from meta/recipes-kernel/lttng/lttng-modules_2.11.6.bb)29
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.11.5.bb3
22 files changed, 301 insertions, 1571 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0001-fix-strncpy-equals-destination-size-warning.patch b/meta/recipes-kernel/lttng/lttng-modules/0001-fix-strncpy-equals-destination-size-warning.patch
deleted file mode 100644
index 6f82488772..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0001-fix-strncpy-equals-destination-size-warning.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From cb78974394a9af865e1d2d606e838dbec0de80e8 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 5 Oct 2020 15:31:42 -0400
4Subject: [PATCH 01/16] fix: strncpy equals destination size warning
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Some versions of GCC when called with -Wstringop-truncation will warn
10when doing a copy of the same size as the destination buffer with
11strncpy :
12
13 ‘strncpy’ specified bound 256 equals destination size [-Werror=stringop-truncation]
14
15Since we unconditionally write '\0' in the last byte, reduce the copy
16size by one.
17
18Upstream-Status: Backport
19
20Change-Id: Idb907c9550817a06fc0dffc489740f63d440e7d4
21Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
22Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
23---
24 lttng-syscalls.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27diff --git a/lttng-syscalls.c b/lttng-syscalls.c
28index 49c0d81b..b43dd570 100644
29--- a/lttng-syscalls.c
30+++ b/lttng-syscalls.c
31@@ -719,7 +719,7 @@ int fill_table(const struct trace_syscall_entry *table, size_t table_len,
32 ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT;
33 break;
34 }
35- strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN);
36+ strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN - 1);
37 ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
38 ev.instrumentation = LTTNG_KERNEL_SYSCALL;
39 chan_table[i] = _lttng_event_create(chan, &ev, filter,
40--
412.25.1
42
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0002-fix-objtool-Rename-frame.h-objtool.h-v5.10.patch b/meta/recipes-kernel/lttng/lttng-modules/0002-fix-objtool-Rename-frame.h-objtool.h-v5.10.patch
deleted file mode 100644
index 90d7b0cf9c..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0002-fix-objtool-Rename-frame.h-objtool.h-v5.10.patch
+++ /dev/null
@@ -1,88 +0,0 @@
1From 8e4e8641961df32bfe519fd18d899250951acd1a Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 26 Oct 2020 13:41:02 -0400
4Subject: [PATCH 02/16] 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.25.1
88
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch b/meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch
deleted file mode 100644
index 2a100361ea..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0003-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch
+++ /dev/null
@@ -1,316 +0,0 @@
1From 5a3b76a81fd3df52405700d369223d64c7a04dc8 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Tue, 27 Oct 2020 11:42:23 -0400
4Subject: [PATCH 03/16] 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
46Upstream-Status: Backport
47
48Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
49Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
50Change-Id: I1d674064d29b31417e2acffdeb735f5052a87032
51---
52 instrumentation/events/lttng-module/btrfs.h | 206 ++++++++++++--------
53 1 file changed, 122 insertions(+), 84 deletions(-)
54
55diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h
56index 7b290085..52fcfd0d 100644
57--- a/instrumentation/events/lttng-module/btrfs.h
58+++ b/instrumentation/events/lttng-module/btrfs.h
59@@ -1856,7 +1856,29 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_f
60
61 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
62
63-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
64+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0) || \
65+ LTTNG_KERNEL_RANGE(5,9,6, 5,10,0) || \
66+ LTTNG_KERNEL_RANGE(5,4,78, 5,5,0))
67+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
68+
69+ btrfs_find_free_extent,
70+
71+ TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
72+ u64 data),
73+
74+ TP_ARGS(root, num_bytes, empty_size, data),
75+
76+ TP_FIELDS(
77+ ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
78+ ctf_integer(u64, root_objectid, root->root_key.objectid)
79+ ctf_integer(u64, num_bytes, num_bytes)
80+ ctf_integer(u64, empty_size, empty_size)
81+ ctf_integer(u64, data, data)
82+ )
83+)
84+
85+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
86+
87 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
88
89 btrfs_find_free_extent,
90@@ -1874,6 +1896,105 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
91 )
92 )
93
94+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
95+
96+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
97+
98+ btrfs_find_free_extent,
99+
100+ TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
101+ u64 data),
102+
103+ TP_ARGS(fs_info, num_bytes, empty_size, data),
104+
105+ TP_FIELDS(
106+ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
107+ ctf_integer(u64, num_bytes, num_bytes)
108+ ctf_integer(u64, empty_size, empty_size)
109+ ctf_integer(u64, data, data)
110+ )
111+)
112+
113+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
114+
115+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
116+
117+ btrfs_find_free_extent,
118+
119+ TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
120+ u64 data),
121+
122+ TP_ARGS(fs_info, num_bytes, empty_size, data),
123+
124+ TP_FIELDS(
125+ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
126+ ctf_integer(u64, num_bytes, num_bytes)
127+ ctf_integer(u64, empty_size, empty_size)
128+ ctf_integer(u64, data, data)
129+ )
130+)
131+
132+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
133+
134+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
135+
136+ btrfs_find_free_extent,
137+
138+ TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
139+ u64 data),
140+
141+ TP_ARGS(fs_info, num_bytes, empty_size, data),
142+
143+ TP_FIELDS(
144+ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
145+ ctf_integer(u64, num_bytes, num_bytes)
146+ ctf_integer(u64, empty_size, empty_size)
147+ ctf_integer(u64, data, data)
148+ )
149+)
150+
151+#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
152+ LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
153+ LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
154+ LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
155+
156+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
157+
158+ btrfs_find_free_extent,
159+
160+ TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
161+ u64 data),
162+
163+ TP_ARGS(root, num_bytes, empty_size, data),
164+
165+ TP_FIELDS(
166+ ctf_integer(u64, root_objectid, root->root_key.objectid)
167+ ctf_integer(u64, num_bytes, num_bytes)
168+ ctf_integer(u64, empty_size, empty_size)
169+ ctf_integer(u64, data, data)
170+ )
171+)
172+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
173+
174+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
175+
176+ btrfs_find_free_extent,
177+
178+ TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
179+ u64 data),
180+
181+ TP_ARGS(root, num_bytes, empty_size, data),
182+
183+ TP_FIELDS(
184+ ctf_integer(u64, root_objectid, root->root_key.objectid)
185+ ctf_integer(u64, num_bytes, num_bytes)
186+ ctf_integer(u64, empty_size, empty_size)
187+ ctf_integer(u64, data, data)
188+ )
189+)
190+#endif
191+
192+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
193 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
194
195 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
196@@ -1907,22 +2028,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
197 )
198
199 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
200-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
201-
202- btrfs_find_free_extent,
203-
204- TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
205- u64 data),
206-
207- TP_ARGS(fs_info, num_bytes, empty_size, data),
208-
209- TP_FIELDS(
210- ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
211- ctf_integer(u64, num_bytes, num_bytes)
212- ctf_integer(u64, empty_size, empty_size)
213- ctf_integer(u64, data, data)
214- )
215-)
216
217 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
218
219@@ -1957,22 +2062,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
220 )
221
222 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
223-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
224-
225- btrfs_find_free_extent,
226-
227- TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
228- u64 data),
229-
230- TP_ARGS(fs_info, num_bytes, empty_size, data),
231-
232- TP_FIELDS(
233- ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
234- ctf_integer(u64, num_bytes, num_bytes)
235- ctf_integer(u64, empty_size, empty_size)
236- ctf_integer(u64, data, data)
237- )
238-)
239
240 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
241
242@@ -2011,23 +2100,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
243
244 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
245
246-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
247-
248- btrfs_find_free_extent,
249-
250- TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
251- u64 data),
252-
253- TP_ARGS(fs_info, num_bytes, empty_size, data),
254-
255- TP_FIELDS(
256- ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
257- ctf_integer(u64, num_bytes, num_bytes)
258- ctf_integer(u64, empty_size, empty_size)
259- ctf_integer(u64, data, data)
260- )
261-)
262-
263 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
264
265 TP_PROTO(struct btrfs_fs_info *fs_info,
266@@ -2066,23 +2138,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
267 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
268 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
269
270-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
271-
272- btrfs_find_free_extent,
273-
274- TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
275- u64 data),
276-
277- TP_ARGS(root, num_bytes, empty_size, data),
278-
279- TP_FIELDS(
280- ctf_integer(u64, root_objectid, root->root_key.objectid)
281- ctf_integer(u64, num_bytes, num_bytes)
282- ctf_integer(u64, empty_size, empty_size)
283- ctf_integer(u64, data, data)
284- )
285-)
286-
287 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
288
289 TP_PROTO(const struct btrfs_root *root,
290@@ -2120,23 +2175,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
291
292 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
293
294-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
295-
296- btrfs_find_free_extent,
297-
298- TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
299- u64 data),
300-
301- TP_ARGS(root, num_bytes, empty_size, data),
302-
303- TP_FIELDS(
304- ctf_integer(u64, root_objectid, root->root_key.objectid)
305- ctf_integer(u64, num_bytes, num_bytes)
306- ctf_integer(u64, empty_size, empty_size)
307- ctf_integer(u64, data, data)
308- )
309-)
310-
311 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
312
313 TP_PROTO(struct btrfs_root *root,
314--
3152.25.1
316
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0004-fix-btrfs-make-ordered-extent-tracepoint-take-btrfs_.patch b/meta/recipes-kernel/lttng/lttng-modules/0004-fix-btrfs-make-ordered-extent-tracepoint-take-btrfs_.patch
deleted file mode 100644
index 67025418c3..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0004-fix-btrfs-make-ordered-extent-tracepoint-take-btrfs_.patch
+++ /dev/null
@@ -1,179 +0,0 @@
1From d51a3332909ff034c8ec16ead0090bd6a4e2bc38 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Tue, 27 Oct 2020 12:10:05 -0400
4Subject: [PATCH 04/16] 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.25.1
179
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0005-fix-ext4-fast-commit-recovery-path-v5.10.patch b/meta/recipes-kernel/lttng/lttng-modules/0005-fix-ext4-fast-commit-recovery-path-v5.10.patch
deleted file mode 100644
index 63d97fa4a3..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0005-fix-ext4-fast-commit-recovery-path-v5.10.patch
+++ /dev/null
@@ -1,91 +0,0 @@
1From b96f5364ba4d5a8b9e8159fe0b9e20d598a1c0f5 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 26 Oct 2020 17:03:23 -0400
4Subject: [PATCH 05/16] 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 | 40 ++++++++++++++++++++++
29 1 file changed, 40 insertions(+)
30
31diff --git a/instrumentation/events/lttng-module/ext4.h b/instrumentation/events/lttng-module/ext4.h
32index f9a55e29..5fddccad 100644
33--- a/instrumentation/events/lttng-module/ext4.h
34+++ b/instrumentation/events/lttng-module/ext4.h
35@@ -1423,6 +1423,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@@ -2045,6 +2057,34 @@ LTTNG_TRACEPOINT_EVENT(ext4_es_shrink_exit,
55
56 #endif
57
58+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
59+LTTNG_TRACEPOINT_EVENT(ext4_fc_replay_scan,
60+ TP_PROTO(struct super_block *sb, int error, int off),
61+
62+ TP_ARGS(sb, error, off),
63+
64+ TP_FIELDS(
65+ ctf_integer(dev_t, dev, sb->s_dev)
66+ ctf_integer(int, error, error)
67+ ctf_integer(int, off, off)
68+ )
69+)
70+
71+LTTNG_TRACEPOINT_EVENT(ext4_fc_replay,
72+ TP_PROTO(struct super_block *sb, int tag, int ino, int priv1, int priv2),
73+
74+ TP_ARGS(sb, tag, ino, priv1, priv2),
75+
76+ TP_FIELDS(
77+ ctf_integer(dev_t, dev, sb->s_dev)
78+ ctf_integer(int, tag, tag)
79+ ctf_integer(int, ino, ino)
80+ ctf_integer(int, priv1, priv1)
81+ ctf_integer(int, priv2, priv2)
82+ )
83+)
84+#endif
85+
86 #endif /* LTTNG_TRACE_EXT4_H */
87
88 /* This part must be outside protection */
89--
902.25.1
91
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0006-fix-KVM-x86-Add-intr-vectoring-info-and-error-code-t.patch b/meta/recipes-kernel/lttng/lttng-modules/0006-fix-KVM-x86-Add-intr-vectoring-info-and-error-code-t.patch
deleted file mode 100644
index 56c563cea3..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0006-fix-KVM-x86-Add-intr-vectoring-info-and-error-code-t.patch
+++ /dev/null
@@ -1,124 +0,0 @@
1From a6334775b763c187d84914e89a0b835a793ae0fd Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 26 Oct 2020 14:11:17 -0400
4Subject: [PATCH 06/16] fix: KVM: x86: Add intr/vectoring info and error code
5 to kvm_exit tracepoint (v5.10)
6
7See upstream commit :
8
9 commit 235ba74f008d2e0936b29f77f68d4e2f73ffd24a
10 Author: Sean Christopherson <sean.j.christopherson@intel.com>
11 Date: Wed Sep 23 13:13:46 2020 -0700
12
13 KVM: x86: Add intr/vectoring info and error code to kvm_exit tracepoint
14
15 Extend the kvm_exit tracepoint to align it with kvm_nested_vmexit in
16 terms of what information is captured. On SVM, add interrupt info and
17 error code, while on VMX it add IDT vectoring and error code. This
18 sets the stage for macrofying the kvm_exit tracepoint definition so that
19 it can be reused for kvm_nested_vmexit without loss of information.
20
21 Opportunistically stuff a zero for VM_EXIT_INTR_INFO if the VM-Enter
22 failed, as the field is guaranteed to be invalid. Note, it'd be
23 possible to further filter the interrupt/exception fields based on the
24 VM-Exit reason, but the helper is intended only for tracepoints, i.e.
25 an extra VMREAD or two is a non-issue, the failed VM-Enter case is just
26 low hanging fruit.
27
28Upstream-Status: Backport
29
30Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
31Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
32Change-Id: I638fa29ef7d8bb432de42a33f9ae4db43259b915
33---
34 .../events/lttng-module/arch/x86/kvm/trace.h | 55 ++++++++++++++++++-
35 1 file changed, 53 insertions(+), 2 deletions(-)
36
37diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
38index 4416ae02..0917b51f 100644
39--- a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
40+++ b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
41@@ -115,6 +115,37 @@ LTTNG_TRACEPOINT_EVENT_MAP(kvm_apic, kvm_x86_apic,
42 /*
43 * Tracepoint for kvm guest exit:
44 */
45+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
46+LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
47+ TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa),
48+ TP_ARGS(exit_reason, vcpu, isa),
49+
50+ TP_locvar(
51+ u64 info1, info2;
52+ u32 intr_info, error_code;
53+ ),
54+
55+ TP_code_pre(
56+ kvm_x86_ops.get_exit_info(vcpu, &tp_locvar->info1,
57+ &tp_locvar->info2,
58+ &tp_locvar->intr_info,
59+ &tp_locvar->error_code);
60+ ),
61+
62+ TP_FIELDS(
63+ ctf_integer(unsigned int, exit_reason, exit_reason)
64+ ctf_integer(unsigned long, guest_rip, kvm_rip_read(vcpu))
65+ ctf_integer(u32, isa, isa)
66+ ctf_integer(u64, info1, tp_locvar->info1)
67+ ctf_integer(u64, info2, tp_locvar->info2)
68+ ctf_integer(u32, intr_info, tp_locvar->intr_info)
69+ ctf_integer(u32, error_code, tp_locvar->error_code)
70+ ctf_integer(unsigned int, vcpu_id, vcpu->vcpu_id)
71+ ),
72+
73+ TP_code_post()
74+)
75+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
76 LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
77 TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa),
78 TP_ARGS(exit_reason, vcpu, isa),
79@@ -124,13 +155,32 @@ LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
80 ),
81
82 TP_code_pre(
83-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
84 kvm_x86_ops.get_exit_info(vcpu, &tp_locvar->info1,
85 &tp_locvar->info2);
86+ ),
87+
88+ TP_FIELDS(
89+ ctf_integer(unsigned int, exit_reason, exit_reason)
90+ ctf_integer(unsigned long, guest_rip, kvm_rip_read(vcpu))
91+ ctf_integer(u32, isa, isa)
92+ ctf_integer(u64, info1, tp_locvar->info1)
93+ ctf_integer(u64, info2, tp_locvar->info2)
94+ ),
95+
96+ TP_code_post()
97+)
98 #else
99+LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
100+ TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa),
101+ TP_ARGS(exit_reason, vcpu, isa),
102+
103+ TP_locvar(
104+ u64 info1, info2;
105+ ),
106+
107+ TP_code_pre(
108 kvm_x86_ops->get_exit_info(vcpu, &tp_locvar->info1,
109 &tp_locvar->info2);
110-#endif
111 ),
112
113 TP_FIELDS(
114@@ -143,6 +193,7 @@ LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
115
116 TP_code_post()
117 )
118+#endif
119
120 /*
121 * Tracepoint for kvm interrupt injection:
122--
1232.25.1
124
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0007-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch b/meta/recipes-kernel/lttng/lttng-modules/0007-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch
deleted file mode 100644
index d78a8c25c7..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0007-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch
+++ /dev/null
@@ -1,82 +0,0 @@
1From 2f421c43c60b2c9d3ed63c1a363320e98a536a35 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 26 Oct 2020 14:28:35 -0400
4Subject: [PATCH 07/16] 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.25.1
82
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0008-fix-KVM-x86-mmu-Return-unique-RET_PF_-values-if-the-.patch b/meta/recipes-kernel/lttng/lttng-modules/0008-fix-KVM-x86-mmu-Return-unique-RET_PF_-values-if-the-.patch
deleted file mode 100644
index a71bb728f0..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0008-fix-KVM-x86-mmu-Return-unique-RET_PF_-values-if-the-.patch
+++ /dev/null
@@ -1,71 +0,0 @@
1From 14bbccffa579f4d66e2900843d6afae1294ce7c8 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 26 Oct 2020 17:07:13 -0400
4Subject: [PATCH 08/16] fix: KVM: x86/mmu: Return unique RET_PF_* values if the
5 fault was fixed (v5.10)
6
7See upstream commit :
8
9 commit c4371c2a682e0da1ed2cd7e3c5496f055d873554
10 Author: Sean Christopherson <sean.j.christopherson@intel.com>
11 Date: Wed Sep 23 15:04:24 2020 -0700
12
13 KVM: x86/mmu: Return unique RET_PF_* values if the fault was fixed
14
15 Introduce RET_PF_FIXED and RET_PF_SPURIOUS to provide unique return
16 values instead of overloading RET_PF_RETRY. In the short term, the
17 unique values add clarity to the code and RET_PF_SPURIOUS will be used
18 by set_spte() to avoid unnecessary work for spurious faults.
19
20 In the long term, TDX will use RET_PF_FIXED to deterministically map
21 memory during pre-boot. The page fault flow may bail early for benign
22 reasons, e.g. if the mmu_notifier fires for an unrelated address. With
23 only RET_PF_RETRY, it's impossible for the caller to distinguish between
24 "cool, page is mapped" and "darn, need to try again", and thus cannot
25 handle benign cases like the mmu_notifier retry.
26
27Upstream-Status: Backport
28
29Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
30Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
31Change-Id: Ie0855c78852b45f588e131fe2463e15aae1bc023
32---
33 .../lttng-module/arch/x86/kvm/mmutrace.h | 22 ++++++++++++++++++-
34 1 file changed, 21 insertions(+), 1 deletion(-)
35
36diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
37index 86717835..cdf0609f 100644
38--- a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
39+++ b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
40@@ -233,7 +233,27 @@ LTTNG_TRACEPOINT_EVENT_MAP(
41 )
42 )
43
44-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) || \
45+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
46+LTTNG_TRACEPOINT_EVENT_MAP(
47+ fast_page_fault,
48+
49+ kvm_mmu_fast_page_fault,
50+
51+ TP_PROTO(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa, u32 error_code,
52+ u64 *sptep, u64 old_spte, int ret),
53+ TP_ARGS(vcpu, cr2_or_gpa, error_code, sptep, old_spte, ret),
54+
55+ TP_FIELDS(
56+ ctf_integer(int, vcpu_id, vcpu->vcpu_id)
57+ ctf_integer(gpa_t, cr2_or_gpa, cr2_or_gpa)
58+ ctf_integer(u32, error_code, error_code)
59+ ctf_integer_hex(u64 *, sptep, sptep)
60+ ctf_integer(u64, old_spte, old_spte)
61+ ctf_integer(u64, new_spte, *sptep)
62+ ctf_integer(int, ret, ret)
63+ )
64+)
65+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) || \
66 LTTNG_KERNEL_RANGE(4,19,103, 4,20,0) || \
67 LTTNG_KERNEL_RANGE(5,4,19, 5,5,0) || \
68 LTTNG_KERNEL_RANGE(5,5,3, 5,6,0) || \
69--
702.25.1
71
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0009-fix-tracepoint-Optimize-using-static_call-v5.10.patch b/meta/recipes-kernel/lttng/lttng-modules/0009-fix-tracepoint-Optimize-using-static_call-v5.10.patch
deleted file mode 100644
index b942aa5c95..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0009-fix-tracepoint-Optimize-using-static_call-v5.10.patch
+++ /dev/null
@@ -1,155 +0,0 @@
1From c6b31b349fe901a8f586a66064f9e9b15449ac1c Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 26 Oct 2020 17:09:05 -0400
4Subject: [PATCH 09/16] 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 | 44 ++++++++++++++++++++++++++++++++-------
31 probes/lttng.c | 7 +++++--
32 tests/probes/lttng-test.c | 7 ++++++-
33 wrapper/tracepoint.h | 8 +++++++
34 4 files changed, 56 insertions(+), 10 deletions(-)
35
36diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c
37index 54a309d1..e0b19b42 100644
38--- a/lttng-statedump-impl.c
39+++ b/lttng-statedump-impl.c
40@@ -55,13 +55,43 @@
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_network_interface);
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_network_interface,
85+ TP_PROTO(struct lttng_session *session,
86+ struct net_device *dev, struct in_ifaddr *ifa),
87+ TP_ARGS(session, dev, ifa));
88
89 struct lttng_fd_ctx {
90 char *page;
91diff --git a/probes/lttng.c b/probes/lttng.c
92index 05bc1388..7ddaa69f 100644
93--- a/probes/lttng.c
94+++ b/probes/lttng.c
95@@ -8,7 +8,7 @@
96 */
97
98 #include <linux/module.h>
99-#include <linux/tracepoint.h>
100+#include <wrapper/tracepoint.h>
101 #include <linux/uaccess.h>
102 #include <linux/gfp.h>
103 #include <linux/fs.h>
104@@ -32,7 +32,10 @@
105 #define LTTNG_LOGGER_COUNT_MAX 1024
106 #define LTTNG_LOGGER_FILE "lttng-logger"
107
108-DEFINE_TRACE(lttng_logger);
109+LTTNG_DEFINE_TRACE(lttng_logger,
110+ PARAMS(const char __user *text, size_t len),
111+ PARAMS(text, len)
112+);
113
114 static struct proc_dir_entry *lttng_logger_dentry;
115
116diff --git a/tests/probes/lttng-test.c b/tests/probes/lttng-test.c
117index c728bed5..8f2d3feb 100644
118--- a/tests/probes/lttng-test.c
119+++ b/tests/probes/lttng-test.c
120@@ -26,7 +26,12 @@
121 #define LTTNG_INSTRUMENTATION
122 #include <instrumentation/events/lttng-module/lttng-test.h>
123
124-DEFINE_TRACE(lttng_test_filter_event);
125+LTTNG_DEFINE_TRACE(lttng_test_filter_event,
126+ PARAMS(int anint, int netint, long *values,
127+ char *text, size_t textlen,
128+ char *etext, uint32_t * net_values),
129+ PARAMS(anint, netint, values, text, textlen, etext, net_values)
130+);
131
132 #define LTTNG_TEST_FILTER_EVENT_FILE "lttng-test-filter-event"
133
134diff --git a/wrapper/tracepoint.h b/wrapper/tracepoint.h
135index 3883e11a..758038b6 100644
136--- a/wrapper/tracepoint.h
137+++ b/wrapper/tracepoint.h
138@@ -20,6 +20,14 @@
139
140 #endif
141
142+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
143+#define LTTNG_DEFINE_TRACE(name, proto, args) \
144+ DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
145+#else
146+#define LTTNG_DEFINE_TRACE(name, proto, args) \
147+ DEFINE_TRACE(name)
148+#endif
149+
150 #ifndef HAVE_KABI_2635_TRACEPOINT
151
152 #define kabi_2635_tracepoint_probe_register tracepoint_probe_register
153--
1542.25.1
155
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0010-fix-include-order-for-older-kernels.patch b/meta/recipes-kernel/lttng/lttng-modules/0010-fix-include-order-for-older-kernels.patch
deleted file mode 100644
index 250e9c6261..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0010-fix-include-order-for-older-kernels.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 2ce89d35c9477d8c17c00489c72e1548e16af9b9 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Fri, 20 Nov 2020 11:42:30 -0500
4Subject: [PATCH 10/16] fix: include order for older kernels
5
6Fixes a build failure on v3.0 and v3.1.
7
8Upstream-Status: Backport
9
10Change-Id: Ic48512d2aa5ee46678e67d147b92dba6d0959615
11Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
12Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13---
14 lttng-events.h | 1 +
15 1 file changed, 1 insertion(+)
16
17diff --git a/lttng-events.h b/lttng-events.h
18index 099fd78b..f5cc57c6 100644
19--- a/lttng-events.h
20+++ b/lttng-events.h
21@@ -16,6 +16,7 @@
22 #include <linux/kref.h>
23 #include <lttng-cpuhotplug.h>
24 #include <linux/uuid.h>
25+#include <linux/irq_work.h>
26 #include <wrapper/uprobes.h>
27 #include <lttng-tracer.h>
28 #include <lttng-abi.h>
29--
302.25.1
31
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0011-Add-release-maintainer-script.patch b/meta/recipes-kernel/lttng/lttng-modules/0011-Add-release-maintainer-script.patch
deleted file mode 100644
index d25d64b9de..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0011-Add-release-maintainer-script.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1From 22ffa48439e617a32556365e00827fba062c5688 Mon Sep 17 00:00:00 2001
2From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3Date: Mon, 23 Nov 2020 10:49:57 -0500
4Subject: [PATCH 11/16] Add release maintainer script
5
6Upstream-Status: Backport
7
8Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9---
10 scripts/maintainer/do-release.sh | 37 ++++++++++++++++++++++++++++++++
11 1 file changed, 37 insertions(+)
12 create mode 100755 scripts/maintainer/do-release.sh
13
14diff --git a/scripts/maintainer/do-release.sh b/scripts/maintainer/do-release.sh
15new file mode 100755
16index 00000000..e0cec167
17--- /dev/null
18+++ b/scripts/maintainer/do-release.sh
19@@ -0,0 +1,37 @@
20+#!/bin/sh
21+
22+# invoke with do-release 2.N.M, or 2.N.M-rcXX
23+
24+REL=$1
25+SRCDIR=~/git/lttng-modules
26+# The output files are created in ${HOME}/stable/
27+OUTPUTDIR=${HOME}/stable
28+
29+if [ x"$1" = x"" ]; then
30+ echo "1 arg : VERSION";
31+ exit 1;
32+fi
33+
34+cd ${OUTPUTDIR}
35+
36+echo Doing LTTng modules release ${REL}
37+
38+mkdir lttng-modules-${REL}
39+cd lttng-modules-${REL}
40+cp -ax ${SRCDIR}/. .
41+
42+#cleanup
43+make clean
44+git clean -xdf
45+
46+for a in \*.orig \*.rej Module.markers Module.symvers; do
47+ find . -name "${a}" -exec rm '{}' \;;
48+done
49+for a in outgoing .tmp_versions .git .pc; do
50+ find . -name "${a}" -exec rm -rf '{}' \;;
51+done
52+
53+cd ..
54+tar cvfj lttng-modules-${REL}.tar.bz2 lttng-modules-${REL}
55+mksums lttng-modules-${REL}.tar.bz2
56+signpkg lttng-modules-${REL}.tar.bz2
57--
582.25.1
59
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0012-Improve-the-release-script.patch b/meta/recipes-kernel/lttng/lttng-modules/0012-Improve-the-release-script.patch
deleted file mode 100644
index f5e7fb55a2..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0012-Improve-the-release-script.patch
+++ /dev/null
@@ -1,173 +0,0 @@
1From a241d30fa82ed0be1026f14e36e8bd2b0e65740d Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 23 Nov 2020 12:15:43 -0500
4Subject: [PATCH 12/16] Improve the release script
5
6 * Use git-archive, this removes all custom code to cleanup the repo, it
7 can now be used in an unclean repo as the code will be exported from
8 a specific tag.
9 * Add parameters, this will allow using the script on any machine
10 while keeping the default behavior for the maintainer.
11
12Upstream-Status: Backport
13
14Change-Id: I9f29d0e1afdbf475d0bbaeb9946ca3216f725e86
15Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
16Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
17---
18 .gitattributes | 3 +
19 scripts/maintainer/do-release.sh | 121 +++++++++++++++++++++++++------
20 2 files changed, 100 insertions(+), 24 deletions(-)
21 create mode 100644 .gitattributes
22
23diff --git a/.gitattributes b/.gitattributes
24new file mode 100644
25index 00000000..7839355a
26--- /dev/null
27+++ b/.gitattributes
28@@ -0,0 +1,3 @@
29+.gitattributes export-ignore
30+.gitignore export-ignore
31+.gitreview export-ignore
32diff --git a/scripts/maintainer/do-release.sh b/scripts/maintainer/do-release.sh
33index e0cec167..5e94e136 100755
34--- a/scripts/maintainer/do-release.sh
35+++ b/scripts/maintainer/do-release.sh
36@@ -1,37 +1,110 @@
37-#!/bin/sh
38+#!/bin/bash
39+
40+set -eu
41+set -o pipefail
42
43 # invoke with do-release 2.N.M, or 2.N.M-rcXX
44
45-REL=$1
46-SRCDIR=~/git/lttng-modules
47+# Default maintainer values
48+SRCDIR="${HOME}/git/lttng-modules"
49 # The output files are created in ${HOME}/stable/
50-OUTPUTDIR=${HOME}/stable
51+OUTPUTDIR="${HOME}/stable"
52+SIGN="yes"
53+VERBOSE=""
54+
55+usage() {
56+ echo "Usage: do-release.sh [OPTION]... RELEASE"
57+ echo
58+ echo "Mandatory arguments to long options are mandatory for short options too."
59+ echo " -s, --srcdir DIR source directory"
60+ echo " -o, --outputdir DIR output directory, must exist"
61+ echo " -n, --no-sign don't GPG sign the output archive"
62+ echo " -v, --verbose verbose command output"
63+}
64+
65+POS_ARGS=()
66+while [[ $# -gt 0 ]]
67+do
68+ arg="$1"
69+
70+ case $arg in
71+ -n|--no-sign)
72+ SIGN="no"
73+ shift 1
74+ ;;
75+
76+ -s|--srcdir)
77+ SRCDIR="$2"
78+ shift 2
79+ ;;
80+
81+ -o|--outputdir)
82+ OUTPUTDIR="$2"
83+ shift 2
84+ ;;
85+
86+ -v|--verbose)
87+ VERBOSE="-v"
88+ shift 1
89+ ;;
90+
91+ # Catch unknown arguments
92+ -*)
93+ usage
94+ exit 1
95+ ;;
96+
97+ *)
98+ POS_ARGS+=("$1")
99+ shift
100+ ;;
101+ esac
102+done
103+set -- "${POS_ARGS[@]}"
104
105-if [ x"$1" = x"" ]; then
106- echo "1 arg : VERSION";
107+REL=${1:-}
108+
109+if [ x"${REL}" = x"" ]; then
110+ usage
111 exit 1;
112 fi
113
114-cd ${OUTPUTDIR}
115+echo "Doing LTTng modules release ${REL}"
116+echo " Source dir: ${SRCDIR}"
117+echo " Output dir: ${OUTPUTDIR}"
118+echo " GPG sign: ${SIGN}"
119
120-echo Doing LTTng modules release ${REL}
121+# Make sure the output directory exists
122+if [ ! -d "${OUTPUTDIR}" ]; then
123+ echo "Output directory '${OUTPUTDIR}' doesn't exist."
124+ exit 1
125+fi
126
127-mkdir lttng-modules-${REL}
128-cd lttng-modules-${REL}
129-cp -ax ${SRCDIR}/. .
130+# Make sure the source directory is a git repository
131+if [ ! -r "${SRCDIR}/.git/config" ]; then
132+ echo "Source directory '${SRCDIR}' isn't a git repository."
133+ exit 1
134+fi
135
136-#cleanup
137-make clean
138-git clean -xdf
139+# Set the git repo directory for all further git commands
140+export GIT_DIR="${SRCDIR}/.git/"
141
142-for a in \*.orig \*.rej Module.markers Module.symvers; do
143- find . -name "${a}" -exec rm '{}' \;;
144-done
145-for a in outgoing .tmp_versions .git .pc; do
146- find . -name "${a}" -exec rm -rf '{}' \;;
147-done
148+# Check if the release tag exists
149+if ! git rev-parse "refs/tags/v${REL}" >/dev/null 2>&1; then
150+ echo "Release tag 'v${REL}' doesn't exist."
151+ exit 1
152+fi
153+
154+# Generate the compressed tar archive, the git attributes from the tag will be used.
155+git archive $VERBOSE --format=tar --prefix="lttng-modules-${REL}/" "v${REL}" | bzip2 > "${OUTPUTDIR}/lttng-modules-${REL}.tar.bz2"
156
157-cd ..
158-tar cvfj lttng-modules-${REL}.tar.bz2 lttng-modules-${REL}
159-mksums lttng-modules-${REL}.tar.bz2
160-signpkg lttng-modules-${REL}.tar.bz2
161+pushd "${OUTPUTDIR}" >/dev/null
162+# Generate the hashes
163+md5sum "lttng-modules-${REL}.tar.bz2" > "lttng-modules-${REL}.tar.bz2.md5"
164+sha256sum "lttng-modules-${REL}.tar.bz2" > "lttng-modules-${REL}.tar.bz2.sha256"
165+
166+if [ "x${SIGN}" = "xyes" ]; then
167+ # Sign with the default key
168+ gpg --armor -b "lttng-modules-${REL}.tar.bz2"
169+fi
170+popd >/dev/null
171--
1722.25.1
173
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0013-fix-backport-of-fix-ext4-fast-commit-recovery-path-v.patch b/meta/recipes-kernel/lttng/lttng-modules/0013-fix-backport-of-fix-ext4-fast-commit-recovery-path-v.patch
deleted file mode 100644
index f6288923e1..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0013-fix-backport-of-fix-ext4-fast-commit-recovery-path-v.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From 59fcc704bea8ecf4bd401e744df41e3331359524 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 23 Nov 2020 10:19:52 -0500
4Subject: [PATCH 13/16] fix: backport of fix: ext4: fast commit recovery path
5 (v5.10)
6
7Add missing '#endif'.
8
9Upstream-Status: Backport
10
11Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
12Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13Change-Id: I43349d685d7ed740b32ce992be0c2e7e6f12c799
14---
15 instrumentation/events/lttng-module/ext4.h | 1 +
16 1 file changed, 1 insertion(+)
17
18diff --git a/instrumentation/events/lttng-module/ext4.h b/instrumentation/events/lttng-module/ext4.h
19index 5fddccad..d454fa6e 100644
20--- a/instrumentation/events/lttng-module/ext4.h
21+++ b/instrumentation/events/lttng-module/ext4.h
22@@ -1446,6 +1446,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_load_inode,
23 )
24 )
25 #endif
26+#endif
27
28 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
29
30--
312.25.1
32
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0014-Revert-fix-include-order-for-older-kernels.patch b/meta/recipes-kernel/lttng/lttng-modules/0014-Revert-fix-include-order-for-older-kernels.patch
deleted file mode 100644
index 446391a832..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0014-Revert-fix-include-order-for-older-kernels.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From b2df75dd378ce5260bb51872e43ac1d76fbf4588 Mon Sep 17 00:00:00 2001
2From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3Date: Mon, 23 Nov 2020 14:21:51 -0500
4Subject: [PATCH 14/16] Revert "fix: include order for older kernels"
5
6This reverts commit 2ce89d35c9477d8c17c00489c72e1548e16af9b9.
7
8This commit is only needed for master and stable-2.12, because
9stable-2.11 does not include irq_work.h.
10
11Upstream-Status: Backport
12
13Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
14---
15 lttng-events.h | 1 -
16 1 file changed, 1 deletion(-)
17
18diff --git a/lttng-events.h b/lttng-events.h
19index f5cc57c6..099fd78b 100644
20--- a/lttng-events.h
21+++ b/lttng-events.h
22@@ -16,7 +16,6 @@
23 #include <linux/kref.h>
24 #include <lttng-cpuhotplug.h>
25 #include <linux/uuid.h>
26-#include <linux/irq_work.h>
27 #include <wrapper/uprobes.h>
28 #include <lttng-tracer.h>
29 #include <lttng-abi.h>
30--
312.25.1
32
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0015-fix-backport-of-fix-tracepoint-Optimize-using-static.patch b/meta/recipes-kernel/lttng/lttng-modules/0015-fix-backport-of-fix-tracepoint-Optimize-using-static.patch
deleted file mode 100644
index 1ff10d48da..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0015-fix-backport-of-fix-tracepoint-Optimize-using-static.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From f8922333020aaa267e17fb23180b56c4c16ebe9e Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Tue, 24 Nov 2020 11:11:42 -0500
4Subject: [PATCH 15/16] fix: backport of fix: tracepoint: Optimize using
5 static_call() (v5.10)
6
7Upstream-Status: Backport
8
9Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
10Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11Change-Id: I94f2b845f11654e639f03254185980de527a4ca8
12---
13 lttng-statedump-impl.c | 9 ++++-----
14 1 file changed, 4 insertions(+), 5 deletions(-)
15
16diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c
17index e0b19b42..a8c32db5 100644
18--- a/lttng-statedump-impl.c
19+++ b/lttng-statedump-impl.c
20@@ -72,10 +72,9 @@ LTTNG_DEFINE_TRACE(lttng_statedump_interrupt,
21
22 LTTNG_DEFINE_TRACE(lttng_statedump_file_descriptor,
23 TP_PROTO(struct lttng_session *session,
24- struct files_struct *files,
25- int fd, const char *filename,
26+ struct task_struct *p, int fd, const char *filename,
27 unsigned int flags, fmode_t fmode),
28- TP_ARGS(session, files, fd, filename, flags, fmode));
29+ TP_ARGS(session, p, fd, filename, flags, fmode));
30
31 LTTNG_DEFINE_TRACE(lttng_statedump_start,
32 TP_PROTO(struct lttng_session *session),
33@@ -85,8 +84,8 @@ LTTNG_DEFINE_TRACE(lttng_statedump_process_state,
34 TP_PROTO(struct lttng_session *session,
35 struct task_struct *p,
36 int type, int mode, int submode, int status,
37- struct files_struct *files),
38- TP_ARGS(session, p, type, mode, submode, status, files));
39+ struct pid_namespace *pid_ns),
40+ TP_ARGS(session, p, type, mode, submode, status, pid_ns));
41
42 LTTNG_DEFINE_TRACE(lttng_statedump_network_interface,
43 TP_PROTO(struct lttng_session *session,
44--
452.25.1
46
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0016-fix-adjust-version-range-for-trace_find_free_extent.patch b/meta/recipes-kernel/lttng/lttng-modules/0016-fix-adjust-version-range-for-trace_find_free_extent.patch
deleted file mode 100644
index 59d4d7afa7..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0016-fix-adjust-version-range-for-trace_find_free_extent.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1From 5c3e67d7994097cc75f45258b7518aacb55dde1b Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Tue, 24 Nov 2020 11:27:18 -0500
4Subject: [PATCH 16/16] fix: adjust version range for trace_find_free_extent()
5
6Upstream-Status: Backport
7
8Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
9Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10Change-Id: Iaa6088092cf58b4d29d55f3ff9586c57ae272302
11---
12 instrumentation/events/lttng-module/btrfs.h | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h
16index d47f3280..efe7af96 100644
17--- a/instrumentation/events/lttng-module/btrfs.h
18+++ b/instrumentation/events/lttng-module/btrfs.h
19@@ -1917,7 +1917,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_f
20 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
21
22 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0) || \
23- LTTNG_KERNEL_RANGE(5,9,6, 5,10,0) || \
24+ LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \
25 LTTNG_KERNEL_RANGE(5,4,78, 5,5,0))
26 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
27
28--
292.25.1
30
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0017-fix-random-remove-unused-tracepoints-v5.18.patch b/meta/recipes-kernel/lttng/lttng-modules/0017-fix-random-remove-unused-tracepoints-v5.18.patch
new file mode 100644
index 0000000000..3fc7fd733d
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0017-fix-random-remove-unused-tracepoints-v5.18.patch
@@ -0,0 +1,46 @@
1From 25b70c486bb96de0caf7cea1da42ed07801cca84 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 4 Apr 2022 14:33:42 -0400
4Subject: [PATCH 17/19] fix: random: remove unused tracepoints (v5.18)
5
6See upstream commit :
7
8 commit 14c174633f349cb41ea90c2c0aaddac157012f74
9 Author: Jason A. Donenfeld <Jason@zx2c4.com>
10 Date: Thu Feb 10 16:40:44 2022 +0100
11
12 random: remove unused tracepoints
13
14 These explicit tracepoints aren't really used and show sign of aging.
15 It's work to keep these up to date, and before I attempted to keep them
16 up to date, they weren't up to date, which indicates that they're not
17 really used. These days there are better ways of introspecting anyway.
18
19Upstream-Status: Backport [369d82bb1746447514c877088d7c5fd0f39140f8]
20Change-Id: I3b8c3e2732e7efdd76ce63204ac53a48784d0df6
21Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
22Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
23---
24 probes/Kbuild | 5 ++++-
25 1 file changed, 4 insertions(+), 1 deletion(-)
26
27diff --git a/probes/Kbuild b/probes/Kbuild
28index 3ae2d39e..58da82b8 100644
29--- a/probes/Kbuild
30+++ b/probes/Kbuild
31@@ -215,8 +215,11 @@ ifneq ($(CONFIG_FRAME_WARN),0)
32 CFLAGS_lttng-probe-printk.o += -Wframe-larger-than=2200
33 endif
34
35+# Introduced in v3.6, remove in v5.18
36 obj-$(CONFIG_LTTNG) += $(shell \
37- if [ $(VERSION) -ge 4 \
38+ if [ \( ! \( $(VERSION) -ge 6 -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \) \) \
39+ -a \
40+ $(VERSION) -ge 4 \
41 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 6 \) \
42 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 5 -a $(SUBLEVEL) -ge 2 \) \
43 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 4 -a $(SUBLEVEL) -ge 9 \) \
44--
452.35.1
46
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0018-fix-random-remove-unused-tracepoints-v5.10-v5.15.patch b/meta/recipes-kernel/lttng/lttng-modules/0018-fix-random-remove-unused-tracepoints-v5.10-v5.15.patch
new file mode 100644
index 0000000000..5c324a9bde
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0018-fix-random-remove-unused-tracepoints-v5.10-v5.15.patch
@@ -0,0 +1,45 @@
1From da956d1444139883f5d01078d945078738ffade4 Mon Sep 17 00:00:00 2001
2From: He Zhe <zhe.he@windriver.com>
3Date: Thu, 2 Jun 2022 06:36:08 +0000
4Subject: [PATCH 18/19] fix: random: remove unused tracepoints (v5.10, v5.15)
5
6The following kernel commit has been back ported to v5.10.119 and v5.15.44.
7
8commit 14c174633f349cb41ea90c2c0aaddac157012f74
9Author: Jason A. Donenfeld <Jason@zx2c4.com>
10Date: Thu Feb 10 16:40:44 2022 +0100
11
12 random: remove unused tracepoints
13
14 These explicit tracepoints aren't really used and show sign of aging.
15 It's work to keep these up to date, and before I attempted to keep them
16 up to date, they weren't up to date, which indicates that they're not
17 really used. These days there are better ways of introspecting anyway.
18
19Upstream-Status: Backport [1901e0eb58795e850e8fdcb5e1c235e4397b470d]
20Signed-off-by: He Zhe <zhe.he@windriver.com>
21Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
22Change-Id: I0b7eb8aa78b5bd2039e20ae3e1da4c5eb9018789
23---
24 probes/Kbuild | 5 ++++-
25 1 file changed, 4 insertions(+), 1 deletion(-)
26
27diff --git a/probes/Kbuild b/probes/Kbuild
28index 58da82b8..87f2d681 100644
29--- a/probes/Kbuild
30+++ b/probes/Kbuild
31@@ -217,7 +217,10 @@ endif
32
33 # Introduced in v3.6, remove in v5.18
34 obj-$(CONFIG_LTTNG) += $(shell \
35- if [ \( ! \( $(VERSION) -ge 6 -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \) \) \
36+ if [ \( ! \( $(VERSION) -ge 6 \
37+ -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \
38+ -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -eq 15 -a $(SUBLEVEL) -ge 44 \) \
39+ -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -eq 10 -a $(SUBLEVEL) -ge 119\) \) \) \
40 -a \
41 $(VERSION) -ge 4 \
42 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 6 \) \
43--
442.35.1
45
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0019-fix-random-tracepoints-removed-in-stable-kernels.patch b/meta/recipes-kernel/lttng/lttng-modules/0019-fix-random-tracepoints-removed-in-stable-kernels.patch
new file mode 100644
index 0000000000..73ba4d06bc
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0019-fix-random-tracepoints-removed-in-stable-kernels.patch
@@ -0,0 +1,51 @@
1From 2c98e0cd03eba0aa935796bc7413c51b5e4b055c Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Tue, 31 May 2022 15:24:48 -0400
4Subject: [PATCH 19/19] fix: 'random' tracepoints removed in stable kernels
5
6The upstream commit 14c174633f349cb41ea90c2c0aaddac157012f74 removing
7the 'random' tracepoints is being backported to multiple stable kernel
8branches, I don't see how that qualifies as a fix but here we are.
9
10Use the presence of 'include/trace/events/random.h' in the kernel source
11tree instead of the rather tortuous version check to determine if we
12need to build 'lttng-probe-random.ko'.
13
14Upstream-Status: Backport [ed1149ef88fb62c365ac66cf62c58ac6abd8d7e8]
15Change-Id: I8f5f2f4c9e09c61127c49c7949b22dd3fab0460d
16Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
17Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
18---
19 probes/Kbuild | 16 ++++------------
20 1 file changed, 4 insertions(+), 12 deletions(-)
21
22diff --git a/probes/Kbuild b/probes/Kbuild
23index 87f2d681..f09d6b65 100644
24--- a/probes/Kbuild
25+++ b/probes/Kbuild
26@@ -216,18 +216,10 @@ ifneq ($(CONFIG_FRAME_WARN),0)
27 endif
28
29 # Introduced in v3.6, remove in v5.18
30-obj-$(CONFIG_LTTNG) += $(shell \
31- if [ \( ! \( $(VERSION) -ge 6 \
32- -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \
33- -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -eq 15 -a $(SUBLEVEL) -ge 44 \) \
34- -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -eq 10 -a $(SUBLEVEL) -ge 119\) \) \) \
35- -a \
36- $(VERSION) -ge 4 \
37- -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 6 \) \
38- -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 5 -a $(SUBLEVEL) -ge 2 \) \
39- -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 4 -a $(SUBLEVEL) -ge 9 \) \
40- -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 0 -a $(SUBLEVEL) -ge 41 \) ] ; then \
41- echo "lttng-probe-random.o" ; fi;)
42+random_dep = $(srctree)/include/trace/events/random.h
43+ifneq ($(wildcard $(random_dep)),)
44+ obj-$(CONFIG_LTTNG) += lttng-probe-random.o
45+endif
46
47 obj-$(CONFIG_LTTNG) += $(shell \
48 if [ $(VERSION) -ge 4 \
49--
502.35.1
51
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.6.bb b/meta/recipes-kernel/lttng/lttng-modules_2.11.9.bb
index 26c247e169..8e9c44241b 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.11.6.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.11.9.bb
@@ -1,6 +1,7 @@
1SECTION = "devel" 1SECTION = "devel"
2SUMMARY = "Linux Trace Toolkit KERNEL MODULE" 2SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
3DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules" 3DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
4HOMEPAGE = "https://lttng.org/"
4LICENSE = "LGPLv2.1 & GPLv2 & MIT" 5LICENSE = "LGPLv2.1 & GPLv2 & MIT"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128" 6LIC_FILES_CHKSUM = "file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128"
6 7
@@ -11,26 +12,14 @@ COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
11SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ 12SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
12 file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \ 13 file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
13 file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \ 14 file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
14 file://0001-fix-strncpy-equals-destination-size-warning.patch \ 15 file://0017-fix-random-remove-unused-tracepoints-v5.18.patch \
15 file://0002-fix-objtool-Rename-frame.h-objtool.h-v5.10.patch \ 16 file://0018-fix-random-remove-unused-tracepoints-v5.10-v5.15.patch \
16 file://0003-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch \ 17 file://0019-fix-random-tracepoints-removed-in-stable-kernels.patch \
17 file://0004-fix-btrfs-make-ordered-extent-tracepoint-take-btrfs_.patch \ 18 file://fix-jbd2-use-the-correct-print-format.patch \
18 file://0005-fix-ext4-fast-commit-recovery-path-v5.10.patch \
19 file://0006-fix-KVM-x86-Add-intr-vectoring-info-and-error-code-t.patch \
20 file://0007-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch \
21 file://0008-fix-KVM-x86-mmu-Return-unique-RET_PF_-values-if-the-.patch \
22 file://0009-fix-tracepoint-Optimize-using-static_call-v5.10.patch \
23 file://0010-fix-include-order-for-older-kernels.patch \
24 file://0011-Add-release-maintainer-script.patch \
25 file://0012-Improve-the-release-script.patch \
26 file://0013-fix-backport-of-fix-ext4-fast-commit-recovery-path-v.patch \
27 file://0014-Revert-fix-include-order-for-older-kernels.patch \
28 file://0015-fix-backport-of-fix-tracepoint-Optimize-using-static.patch \
29 file://0016-fix-adjust-version-range-for-trace_find_free_extent.patch \
30 " 19 "
31 20
32SRC_URI[md5sum] = "8ef09fdfcdec669d33f7fc1c1c80f2c4" 21SRC_URI[md5sum] = "cfb23ea6bdaf1ad40c7f9ac098b4016d"
33SRC_URI[sha256sum] = "23372811cdcd2ac28ba8c9d09484ed5f9238cfbd0043f8c663ff3875ba9c8566" 22SRC_URI[sha256sum] = "0c5fe9f8d8dbd1411a3c1c643dcbd0a55577bd15845758b73948e00bc7c387a6"
34 23
35export INSTALL_MOD_DIR="kernel/lttng-modules" 24export INSTALL_MOD_DIR="kernel/lttng-modules"
36 25
@@ -38,7 +27,9 @@ EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'"
38 27
39do_install_append() { 28do_install_append() {
40 # Delete empty directories to avoid QA failures if no modules were built 29 # Delete empty directories to avoid QA failures if no modules were built
41 find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \; 30 if [ -d ${D}/${nonarch_base_libdir} ]; then
31 find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \;
32 fi
42} 33}
43 34
44python do_package_prepend() { 35python do_package_prepend() {
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.11.5.bb b/meta/recipes-kernel/lttng/lttng-tools_2.11.5.bb
index a969fffd62..6306193809 100644
--- a/meta/recipes-kernel/lttng/lttng-tools_2.11.5.bb
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.11.5.bb
@@ -3,13 +3,14 @@ SUMMARY = "Linux Trace Toolkit Control"
3DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \ 3DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \
4to extract program execution details from the Linux operating system \ 4to extract program execution details from the Linux operating system \
5and interpret them." 5and interpret them."
6HOMEPAGE = "https://github.com/lttng/lttng-tools"
6 7
7LICENSE = "GPLv2 & LGPLv2.1" 8LICENSE = "GPLv2 & LGPLv2.1"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \ 9LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \
9 file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ 10 file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
10 file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca" 11 file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca"
11 12
12DEPENDS = "liburcu popt libxml2 util-linux" 13DEPENDS = "liburcu popt libxml2 util-linux bison-native"
13RDEPENDS_${PN} = "libgcc" 14RDEPENDS_${PN} = "libgcc"
14RDEPENDS_${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod lttng-modules sed python3-core" 15RDEPENDS_${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod lttng-modules sed python3-core"
15RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" 16RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"