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/babeltrace2_2.0.6.bb (renamed from meta/recipes-kernel/lttng/babeltrace2_2.0.5.bb)2
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0001-Fix-sched_stat_runtime-changed-in-linux-6.8.0-rc1.patch70
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-simplify-delayed-ref-tracepoints-v6.10.patch142
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0001-fix-close_on_exec-pass-files_struct-instead-of-fdtab.patch79
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0002-Fix-timer_start-changed-in-linux-6.8.0-rc1.patch100
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0002-fix-btrfs-move-parent-and-ref_root-into-btrfs_delaye.patch58
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0003-Fix-strlcopy-removed-in-linux-6.8.0-rc1.patch46
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0003-fix-net-udp-add-IP-port-data-to-the-tracepoint-udp-u.patch79
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0004-Fix-btrfs_chunk-tracepoints-changed-in-linux-6.8.0-r.patch124
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch88
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0006-Fix-ext4_discard_preallocations-changed-in-linux-6.8.patch52
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules_2.13.13.bb (renamed from meta/recipes-kernel/lttng/lttng-modules_2.13.11.bb)12
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch56
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-tests-do-not-strip-a-helper-library.patch9
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.13.13.bb (renamed from meta/recipes-kernel/lttng/lttng-tools_2.13.11.bb)5
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust_2.13.8.bb (renamed from meta/recipes-kernel/lttng/lttng-ust_2.13.7.bb)2
16 files changed, 427 insertions, 497 deletions
diff --git a/meta/recipes-kernel/lttng/babeltrace2_2.0.5.bb b/meta/recipes-kernel/lttng/babeltrace2_2.0.6.bb
index 9a4007fb25..d6c75d7580 100644
--- a/meta/recipes-kernel/lttng/babeltrace2_2.0.5.bb
+++ b/meta/recipes-kernel/lttng/babeltrace2_2.0.6.bb
@@ -12,7 +12,7 @@ SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-2.0;protocol=http
12 file://0001-tests-do-not-run-test-applications-from-.libs.patch \ 12 file://0001-tests-do-not-run-test-applications-from-.libs.patch \
13 file://0001-Make-manpages-multilib-identical.patch \ 13 file://0001-Make-manpages-multilib-identical.patch \
14 " 14 "
15SRCREV = "66e76d1ea601705928899138f02730a3a2a3153d" 15SRCREV = "0a6632f77801f3218a288604c646f8a39cb0d2c4"
16UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>2(\.\d+)+)$" 16UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>2(\.\d+)+)$"
17 17
18S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-sched_stat_runtime-changed-in-linux-6.8.0-rc1.patch b/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-sched_stat_runtime-changed-in-linux-6.8.0-rc1.patch
deleted file mode 100644
index a0d932c7b7..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-sched_stat_runtime-changed-in-linux-6.8.0-rc1.patch
+++ /dev/null
@@ -1,70 +0,0 @@
1From 9e59c2f6387aeb832ae3af3095f987529722e08f Mon Sep 17 00:00:00 2001
2From: Kienan Stewart <kstewart@efficios.com>
3Date: Mon, 22 Jan 2024 11:10:37 -0500
4Subject: [PATCH 1/5] Fix: sched_stat_runtime changed in linux 6.8.0-rc1
5
6See upstream commit:
7
8 commit 5fe6ec8f6ab549b6422e41551abb51802bd48bc7
9 Author: Peter Zijlstra <peterz@infradead.org>
10 Date: Mon Nov 6 13:41:43 2023 +0100
11
12 sched: Remove vruntime from trace_sched_stat_runtime()
13
14 Tracing the runtime delta makes sense, observer can sum over time.
15 Tracing the absolute vruntime makes less sense, inconsistent:
16 absolute-vs-delta, but also vruntime delta can be computed from
17 runtime delta.
18
19 Removing the vruntime thing also makes the two tracepoint sites
20 identical, allowing to unify the code in a later patch.
21
22Upstream-Status: Backport [Uhttps://review.lttng.org/c/lttng-modules/+/11700]
23
24Change-Id: I24ebb4e06dbb646a1af75ac62b74f3821ff197de
25Signed-off-by: Kienan Stewart <kstewart@efficios.com>
26Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
27---
28 include/instrumentation/events/sched.h | 19 +++++++++++++++++++
29 1 file changed, 19 insertions(+)
30
31diff --git a/include/instrumentation/events/sched.h b/include/instrumentation/events/sched.h
32index 066a0f8..24cf37c 100644
33--- a/include/instrumentation/events/sched.h
34+++ b/include/instrumentation/events/sched.h
35@@ -646,6 +646,24 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template, sched_stat_blocked,
36 TP_ARGS(tsk, delay))
37 #endif
38
39+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
40+/*
41+ * Tracepoint for accounting runtime (time the task is executing
42+ * on a CPU).
43+ */
44+LTTNG_TRACEPOINT_EVENT(sched_stat_runtime,
45+
46+ TP_PROTO(struct task_struct *tsk, u64 runtime),
47+
48+ TP_ARGS(tsk, runtime),
49+
50+ TP_FIELDS(
51+ ctf_array_text(char, comm, tsk->comm, TASK_COMM_LEN)
52+ ctf_integer(pid_t, tid, tsk->pid)
53+ ctf_integer(u64, runtime, runtime)
54+ )
55+)
56+#else
57 /*
58 * Tracepoint for accounting runtime (time the task is executing
59 * on a CPU).
60@@ -663,6 +681,7 @@ LTTNG_TRACEPOINT_EVENT(sched_stat_runtime,
61 ctf_integer(u64, vruntime, vruntime)
62 )
63 )
64+#endif
65
66 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0) || \
67 LTTNG_RT_KERNEL_RANGE(4,9,27,18, 4,10,0,0) || \
68--
692.39.2
70
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-simplify-delayed-ref-tracepoints-v6.10.patch b/meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-simplify-delayed-ref-tracepoints-v6.10.patch
new file mode 100644
index 0000000000..c1e11f2bfb
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0001-fix-btrfs-simplify-delayed-ref-tracepoints-v6.10.patch
@@ -0,0 +1,142 @@
1From db0f940136afd43ce5fcf87c4d4e9ca558db1d4f Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 27 May 2024 13:04:42 -0400
4Subject: [PATCH 1/3] fix: btrfs: simplify delayed ref tracepoints (v6.10)
5
6See upstream commit:
7
8 commit 1bff6d4f873790cfc675afce9860208576508c5a
9 Author: Josef Bacik <josef@toxicpanda.com>
10 Date: Fri Apr 12 20:27:00 2024 -0400
11
12 btrfs: simplify delayed ref tracepoints
13
14 Now that all of the delayed ref information is in the delayed ref node,
15 drastically simplify the delayed ref tracepoints by simply passing in
16 the btrfs_delayed_ref_node and populating the tracepoints with the
17 values from the structure itself.
18
19Upstream-Status: Backport [commit db0f9401 fix: btrfs: simplify delayed ref tracepoints (v6.10)]
20
21Change-Id: Ic90bc23d6aa558baec33adc33b4d21e052e83375
22Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
23Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
24---
25 include/instrumentation/events/btrfs.h | 94 +++++++++++++++++++++++++-
26 1 file changed, 92 insertions(+), 2 deletions(-)
27
28diff --git a/include/instrumentation/events/btrfs.h b/include/instrumentation/events/btrfs.h
29index ffb1b646..d73c1ce5 100644
30--- a/include/instrumentation/events/btrfs.h
31+++ b/include/instrumentation/events/btrfs.h
32@@ -899,7 +899,51 @@ LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
33 )
34 #endif
35
36-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
37+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,10,0))
38+LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
39+
40+ TP_PROTO(const struct btrfs_fs_info *fs_info,
41+ const struct btrfs_delayed_ref_node *ref),
42+
43+ TP_ARGS(fs_info, ref),
44+
45+ TP_FIELDS(
46+ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
47+ ctf_integer(u64, bytenr, ref->bytenr)
48+ ctf_integer(u64, num_bytes, ref->num_bytes)
49+ ctf_integer(int, action, ref->action)
50+ ctf_integer(u64, parent, ref->tree_ref.parent)
51+ ctf_integer(u64, ref_root, ref->tree_ref.root)
52+ ctf_integer(int, level, ref->tree_ref.level)
53+ ctf_integer(int, type, ref->type)
54+ ctf_integer(u64, seq, ref->seq)
55+ )
56+)
57+
58+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
59+
60+ add_delayed_tree_ref,
61+
62+ btrfs_add_delayed_tree_ref,
63+
64+ TP_PROTO(const struct btrfs_fs_info *fs_info,
65+ const struct btrfs_delayed_ref_node *ref),
66+
67+ TP_ARGS(fs_info, ref)
68+)
69+
70+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
71+
72+ run_delayed_tree_ref,
73+
74+ btrfs_run_delayed_tree_ref,
75+
76+ TP_PROTO(const struct btrfs_fs_info *fs_info,
77+ const struct btrfs_delayed_ref_node *ref),
78+
79+ TP_ARGS(fs_info, ref)
80+)
81+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
82 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
83 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
84 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
85@@ -1139,7 +1183,53 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
86 )
87 #endif
88
89-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
90+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,10,0))
91+LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
92+
93+ TP_PROTO(const struct btrfs_fs_info *fs_info,
94+ const struct btrfs_delayed_ref_node *ref),
95+
96+ TP_ARGS(fs_info, ref),
97+
98+ TP_FIELDS(
99+ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
100+ ctf_integer(u64, bytenr, ref->bytenr)
101+ ctf_integer(u64, num_bytes, ref->num_bytes)
102+ ctf_integer(int, action, ref->action)
103+ ctf_integer(u64, parent, ref->data_ref.parent)
104+ ctf_integer(u64, ref_root, ref->data_ref.root)
105+ ctf_integer(u64, owner, ref->data_ref.objectid)
106+ ctf_integer(u64, offset, ref->data_ref.offset)
107+ ctf_integer(int, type, ref->type)
108+ ctf_integer(u64, seq, ref->seq)
109+ )
110+)
111+
112+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
113+
114+ add_delayed_data_ref,
115+
116+ btrfs_add_delayed_data_ref,
117+
118+ TP_PROTO(const struct btrfs_fs_info *fs_info,
119+ const struct btrfs_delayed_ref_node *ref),
120+
121+ TP_ARGS(fs_info, ref)
122+)
123+
124+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
125+
126+ run_delayed_data_ref,
127+
128+ btrfs_run_delayed_data_ref,
129+
130+ TP_PROTO(const struct btrfs_fs_info *fs_info,
131+ const struct btrfs_delayed_ref_node *ref),
132+
133+ TP_ARGS(fs_info, ref)
134+)
135+
136+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
137 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
138 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
139 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
140--
1412.39.2
142
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0001-fix-close_on_exec-pass-files_struct-instead-of-fdtab.patch b/meta/recipes-kernel/lttng/lttng-modules/0001-fix-close_on_exec-pass-files_struct-instead-of-fdtab.patch
new file mode 100644
index 0000000000..bb659d5563
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0001-fix-close_on_exec-pass-files_struct-instead-of-fdtab.patch
@@ -0,0 +1,79 @@
1From c8adc20d19d853527a29411a03e114efdeff5f59 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 27 May 2024 10:49:45 -0400
4Subject: [PATCH] fix: close_on_exec(): pass files_struct instead of fdtable
5 (v6.10)
6
7See upstream commit:
8
9 commit f60d374d2cc88034385265d193a38e3f4a4b430c
10 Author: Al Viro <viro@zeniv.linux.org.uk>
11 Date: Thu Jan 4 21:35:38 2024 -0500
12
13 close_on_exec(): pass files_struct instead of fdtable
14
15 both callers are happier that way...
16
17Upstream-Status: Backport [c8adc20d fix: close_on_exec(): pass files_struct instead of fdtable (v6.10)]
18
19Change-Id: I8cdabb073c2090842b27b74954d86cb486c43b3e
20Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
21Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
22---
23 include/wrapper/fdtable.h | 14 ++++++++++++++
24 src/lttng-statedump-impl.c | 3 +--
25 2 files changed, 15 insertions(+), 2 deletions(-)
26
27Index: lttng-modules-2.13.13/include/wrapper/fdtable.h
28===================================================================
29--- lttng-modules-2.13.13.orig/include/wrapper/fdtable.h
30+++ lttng-modules-2.13.13/include/wrapper/fdtable.h
31@@ -69,20 +69,18 @@ int lttng_iterate_fd(struct files_struct
32
33 #endif
34
35-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
36-
37-static inline bool lttng_close_on_exec(int fd, const struct fdtable *fdt)
38+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,10,0))
39+static inline
40+bool lttng_close_on_exec(unsigned int fd, const struct files_struct *files)
41 {
42- return close_on_exec(fd, fdt);
43+ return close_on_exec(fd, files);
44 }
45-
46 #else
47-
48-static inline bool lttng_close_on_exec(int fd, const struct fdtable *fdt)
49+static inline
50+bool lttng_close_on_exec(unsigned int fd, const struct files_struct *files)
51 {
52- return FD_ISSET(fd, fdt->close_on_exec);
53+ return close_on_exec(fd, files_fdtable(files));
54 }
55-
56 #endif
57
58 #endif /* _LTTNG_WRAPPER_FDTABLE_H */
59Index: lttng-modules-2.13.13/src/lttng-statedump-impl.c
60===================================================================
61--- lttng-modules-2.13.13.orig/src/lttng-statedump-impl.c
62+++ lttng-modules-2.13.13/src/lttng-statedump-impl.c
63@@ -44,7 +44,6 @@
64 #include <wrapper/tracepoint.h>
65 #include <wrapper/genhd.h>
66 #include <wrapper/file.h>
67-#include <wrapper/fdtable.h>
68 #include <wrapper/sched.h>
69
70 #ifdef CONFIG_LTTNG_HAS_LIST_IRQ
71@@ -451,7 +450,7 @@ int lttng_dump_one_fd(const void *p, str
72 * the lock is taken, but we are not aware whether this is
73 * guaranteed or not, so play safe.
74 */
75- if (fd < fdt->max_fds && lttng_close_on_exec(fd, fdt))
76+ if (fd < fdt->max_fds && lttng_close_on_exec(fd, ctx->files))
77 flags |= O_CLOEXEC;
78 if (IS_ERR(s)) {
79 struct dentry *dentry = file->f_path.dentry;
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-timer_start-changed-in-linux-6.8.0-rc1.patch b/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-timer_start-changed-in-linux-6.8.0-rc1.patch
deleted file mode 100644
index 5a4294db02..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-timer_start-changed-in-linux-6.8.0-rc1.patch
+++ /dev/null
@@ -1,100 +0,0 @@
1From d52ab4b9a71a4bef535dadb8e7062112ac5c0c88 Mon Sep 17 00:00:00 2001
2From: Kienan Stewart <kstewart@efficios.com>
3Date: Mon, 22 Jan 2024 11:33:39 -0500
4Subject: [PATCH 2/5] Fix: timer_start changed in linux 6.8.0-rc1
5
6See upstream commit
7
8 commit dbcdcb62b59db2cf6a24113873b90da15c6f0b19
9 Author: Anna-Maria Behnsen <anna-maria@linutronix.de>
10 Date: Fri Dec 1 10:26:26 2023 +0100
11
12 tracing/timers: Enhance timer_start tracepoint
13
14 For starting a timer, the timer is enqueued into a bucket of the timer
15 wheel. The bucket expiry is the defacto expiry of the timer but it is not
16 equal the timer expiry because of increasing granularity when bucket is in
17 a higher level of the wheel. To be able to figure out in a trace whether a
18 timer expired in time or not, the bucket expiry time is required as well.
19
20 Add bucket expiry time to the timer_start tracepoint and thereby simplify
21 the arguments.
22
23Upstream-Status: Backport [Uhttps://review.lttng.org/c/lttng-modules/+/11700]
24
25Change-Id: I4868092765745b1efd0c48f13c0b837f2007dcb6
26Signed-off-by: Kienan Stewart <kstewart@efficios.com>
27Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
28---
29 include/instrumentation/events/timer.h | 24 +++++++++++++-----------
30 1 file changed, 13 insertions(+), 11 deletions(-)
31
32diff --git a/include/instrumentation/events/timer.h b/include/instrumentation/events/timer.h
33index 91a2cd9..ce571f5 100644
34--- a/include/instrumentation/events/timer.h
35+++ b/include/instrumentation/events/timer.h
36@@ -45,8 +45,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(timer_class, timer_init,
37 TP_ARGS(timer)
38 )
39
40-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0) || \
41- LTTNG_RHEL_KERNEL_RANGE(3,10,0,957,0,0, 3,11,0,0,0,0))
42+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
43 /**
44 * timer_start - called when the timer is started
45 * @timer: pointer to struct timer_list
46@@ -55,39 +54,42 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(timer_class, timer_init,
47 */
48 LTTNG_TRACEPOINT_EVENT(timer_start,
49
50- TP_PROTO(struct timer_list *timer, unsigned long expires,
51- unsigned int flags),
52+ TP_PROTO(struct timer_list *timer, unsigned long bucket_expiry),
53
54- TP_ARGS(timer, expires, flags),
55+ TP_ARGS(timer, bucket_expiry),
56
57 TP_FIELDS(
58 ctf_integer_hex(void *, timer, timer)
59 ctf_integer_hex(void *, function, timer->function)
60- ctf_integer(unsigned long, expires, expires)
61+ ctf_integer(unsigned long, expires, timer->expires)
62+ ctf_integer(unsigned long, bucket_expiry, bucket_expiry)
63 ctf_integer(unsigned long, now, jiffies)
64- ctf_integer(unsigned int, flags, flags)
65+ ctf_integer(unsigned int, flags, timer->flags)
66 )
67 )
68-#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
69+#else
70 /**
71 * timer_start - called when the timer is started
72 * @timer: pointer to struct timer_list
73 * @expires: the timers expiry time
74+ * @flags: the timers expiry time
75 */
76 LTTNG_TRACEPOINT_EVENT(timer_start,
77
78- TP_PROTO(struct timer_list *timer, unsigned long expires),
79+ TP_PROTO(struct timer_list *timer, unsigned long expires,
80+ unsigned int flags),
81
82- TP_ARGS(timer, expires),
83+ TP_ARGS(timer, expires, flags),
84
85 TP_FIELDS(
86 ctf_integer_hex(void *, timer, timer)
87 ctf_integer_hex(void *, function, timer->function)
88 ctf_integer(unsigned long, expires, expires)
89 ctf_integer(unsigned long, now, jiffies)
90+ ctf_integer(unsigned int, flags, flags)
91 )
92 )
93-#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
94+#endif
95
96 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0) || \
97 LTTNG_RHEL_KERNEL_RANGE(4,18,0,193,0,0, 4,19,0,0,0,0))
98--
992.39.2
100
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0002-fix-btrfs-move-parent-and-ref_root-into-btrfs_delaye.patch b/meta/recipes-kernel/lttng/lttng-modules/0002-fix-btrfs-move-parent-and-ref_root-into-btrfs_delaye.patch
new file mode 100644
index 0000000000..5d0d1fb314
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0002-fix-btrfs-move-parent-and-ref_root-into-btrfs_delaye.patch
@@ -0,0 +1,58 @@
1From 9bb17e292631f54fb5af4be4fae32ccd3d3d15c7 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 27 May 2024 13:13:15 -0400
4Subject: [PATCH 2/3] fix: btrfs: move ->parent and ->ref_root into
5 btrfs_delayed_ref_node (v6.10)
6
7See upstream commit:
8
9 commit cf4f04325b2b27efa5697ba0ea4c1abdee0035b4
10 Author: Josef Bacik <josef@toxicpanda.com>
11 Date: Fri Apr 12 22:57:13 2024 -0400
12
13 btrfs: move ->parent and ->ref_root into btrfs_delayed_ref_node
14
15 These two members are shared by both the tree refs and data refs, so
16 move them into btrfs_delayed_ref_node proper. This allows us to greatly
17 simplify the comparison code, as the shared refs always only sort on
18 parent, and the non shared refs always sort first on ref_root, and then
19 only data refs sort on their specific fields.
20
21Upstream-Status: Backport [9bb17e29 fix: btrfs: move ->parent and ->ref_root into btrfs_delayed_ref_node (v6.10)]
22
23Change-Id: Ib7c92cc4bb8d674ac66ccfa25c03476f7adaaf90
24Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
25Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
26---
27 include/instrumentation/events/btrfs.h | 8 ++++----
28 1 file changed, 4 insertions(+), 4 deletions(-)
29
30diff --git a/include/instrumentation/events/btrfs.h b/include/instrumentation/events/btrfs.h
31index d73c1ce5..c0c746e2 100644
32--- a/include/instrumentation/events/btrfs.h
33+++ b/include/instrumentation/events/btrfs.h
34@@ -912,8 +912,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
35 ctf_integer(u64, bytenr, ref->bytenr)
36 ctf_integer(u64, num_bytes, ref->num_bytes)
37 ctf_integer(int, action, ref->action)
38- ctf_integer(u64, parent, ref->tree_ref.parent)
39- ctf_integer(u64, ref_root, ref->tree_ref.root)
40+ ctf_integer(u64, parent, ref->parent)
41+ ctf_integer(u64, ref_root, ref->ref_root)
42 ctf_integer(int, level, ref->tree_ref.level)
43 ctf_integer(int, type, ref->type)
44 ctf_integer(u64, seq, ref->seq)
45@@ -1196,8 +1196,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
46 ctf_integer(u64, bytenr, ref->bytenr)
47 ctf_integer(u64, num_bytes, ref->num_bytes)
48 ctf_integer(int, action, ref->action)
49- ctf_integer(u64, parent, ref->data_ref.parent)
50- ctf_integer(u64, ref_root, ref->data_ref.root)
51+ ctf_integer(u64, parent, ref->parent)
52+ ctf_integer(u64, ref_root, ref->ref_root)
53 ctf_integer(u64, owner, ref->data_ref.objectid)
54 ctf_integer(u64, offset, ref->data_ref.offset)
55 ctf_integer(int, type, ref->type)
56--
572.39.2
58
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-strlcopy-removed-in-linux-6.8.0-rc1.patch b/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-strlcopy-removed-in-linux-6.8.0-rc1.patch
deleted file mode 100644
index 4ad9adc5c2..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0003-Fix-strlcopy-removed-in-linux-6.8.0-rc1.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From 7432f583674294b676577b6505b89fc74dc5c7ab Mon Sep 17 00:00:00 2001
2From: Kienan Stewart <kstewart@efficios.com>
3Date: Mon, 22 Jan 2024 11:47:40 -0500
4Subject: [PATCH 3/5] Fix: strlcopy removed in linux 6.8.0-rc1
5
6See upstream commit:
7
8 commit d26270061ae66b915138af7cd73ca6f8b85e6b44
9 Author: Kees Cook <keescook@chromium.org>
10 Date: Thu Jan 18 12:31:55 2024 -0800
11
12 string: Remove strlcpy()
13
14 With all the users of strlcpy() removed[1] from the kernel, remove the
15 API, self-tests, and other references. Leave mentions in Documentation
16 (about its deprecation), and in checkpatch.pl (to help migrate host-only
17 tools/ usage). Long live strscpy().
18
19Upstream-Status: Backport [Uhttps://review.lttng.org/c/lttng-modules/+/11700]
20
21Change-Id: I27cdff70a504b25340cc59150ed8e959d9629e43
22Signed-off-by: Kienan Stewart <kstewart@efficios.com>
23Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
24---
25 src/lib/ringbuffer/ring_buffer_backend.c | 4 ++++
26 1 file changed, 4 insertions(+)
27
28diff --git a/src/lib/ringbuffer/ring_buffer_backend.c b/src/lib/ringbuffer/ring_buffer_backend.c
29index 9a339be..2181145 100644
30--- a/src/lib/ringbuffer/ring_buffer_backend.c
31+++ b/src/lib/ringbuffer/ring_buffer_backend.c
32@@ -405,7 +405,11 @@ int channel_backend_init(struct channel_backend *chanb,
33 chanb->extra_reader_sb =
34 (config->mode == RING_BUFFER_OVERWRITE) ? 1 : 0;
35 chanb->num_subbuf = num_subbuf;
36+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
37+ strscpy(chanb->name, name, NAME_MAX);
38+#else
39 strlcpy(chanb->name, name, NAME_MAX);
40+#endif
41 memcpy(&chanb->config, config, sizeof(chanb->config));
42
43 if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
44--
452.39.2
46
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0003-fix-net-udp-add-IP-port-data-to-the-tracepoint-udp-u.patch b/meta/recipes-kernel/lttng/lttng-modules/0003-fix-net-udp-add-IP-port-data-to-the-tracepoint-udp-u.patch
new file mode 100644
index 0000000000..ab28f870c5
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0003-fix-net-udp-add-IP-port-data-to-the-tracepoint-udp-u.patch
@@ -0,0 +1,79 @@
1From 4ae0d960e149d1205d0cc167e44c120148c7f4f0 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Mon, 27 May 2024 11:11:21 -0400
4Subject: [PATCH 3/3] fix: net: udp: add IP/port data to the tracepoint
5 udp/udp_fail_queue_rcv_skb (v6.10)
6
7See upstream commit:
8
9 commit e9669a00bba79442dd4862c57761333d6a020c24
10 Author: Balazs Scheidler <bazsi77@gmail.com>
11 Date: Tue Mar 26 19:05:47 2024 +0100
12
13 net: udp: add IP/port data to the tracepoint udp/udp_fail_queue_rcv_skb
14
15 The udp_fail_queue_rcv_skb() tracepoint lacks any details on the source
16 and destination IP/port whereas this information can be critical in case
17 of UDP/syslog.
18
19Upstream-Status: Backport [4ae0d960 fix: net: udp: add IP/port data to the tracepoint udp/udp_fail_queue_rcv_skb (v6.10)]
20
21Change-Id: I0c337c5817b0a120298cbf5088d60671d9625b0d
22Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
23Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
24---
25 include/instrumentation/events/udp.h | 30 ++++++++++++++++++++++++++++
26 1 file changed, 30 insertions(+)
27
28diff --git a/include/instrumentation/events/udp.h b/include/instrumentation/events/udp.h
29index b63a1bb5..0a94b466 100644
30--- a/include/instrumentation/events/udp.h
31+++ b/include/instrumentation/events/udp.h
32@@ -7,7 +7,36 @@
33
34 #include <lttng/tracepoint-event.h>
35 #include <linux/udp.h>
36+#include <lttng/kernel-version.h>
37
38+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,10,0))
39+LTTNG_TRACEPOINT_ENUM(lttng_sk_family,
40+ TP_ENUM_VALUES(
41+ ctf_enum_value("AF_INET", AF_INET)
42+ ctf_enum_value("AF_INET6", AF_INET6)
43+ )
44+)
45+
46+LTTNG_TRACEPOINT_EVENT(udp_fail_queue_rcv_skb,
47+
48+ TP_PROTO(int rc, struct sock *sk, struct sk_buff *skb),
49+
50+ TP_ARGS(rc, sk, skb),
51+
52+ TP_FIELDS(
53+ ctf_integer(int, rc, rc)
54+ ctf_integer(__u16, sport, ntohs(udp_hdr(skb)->source))
55+ ctf_integer(__u16, dport, ntohs(udp_hdr(skb)->dest))
56+ ctf_enum(lttng_sk_family, __u16, family, sk->sk_family)
57+ /*
58+ * The 'saddr' and 'daddr' fields from the upstream tracepoint
59+ * are currently not extracted. It is recommended to use a
60+ * tracepoint from the 'net' probe instead which includes all
61+ * fields from the IP header.
62+ */
63+ )
64+)
65+#else
66 LTTNG_TRACEPOINT_EVENT(udp_fail_queue_rcv_skb,
67
68 TP_PROTO(int rc, struct sock *sk),
69@@ -19,6 +48,7 @@ LTTNG_TRACEPOINT_EVENT(udp_fail_queue_rcv_skb,
70 ctf_integer(__u16, lport, inet_sk(sk)->inet_num)
71 )
72 )
73+#endif
74
75 #endif /* LTTNG_TRACE_UDP_H */
76
77--
782.39.2
79
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-btrfs_chunk-tracepoints-changed-in-linux-6.8.0-r.patch b/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-btrfs_chunk-tracepoints-changed-in-linux-6.8.0-r.patch
deleted file mode 100644
index c9b1af37c8..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0004-Fix-btrfs_chunk-tracepoints-changed-in-linux-6.8.0-r.patch
+++ /dev/null
@@ -1,124 +0,0 @@
1From c8198382fe1cede3e16aae9978642a113a217e4c Mon Sep 17 00:00:00 2001
2From: Kienan Stewart <kstewart@efficios.com>
3Date: Mon, 22 Jan 2024 12:17:33 -0500
4Subject: [PATCH 4/5] Fix: btrfs_chunk tracepoints changed in linux 6.8.0-rc1
5
6See upstream commit:
7
8 commit 7dc66abb5a47778d7db327783a0ba172b8cff0b5
9 Author: Filipe Manana <fdmanana@suse.com>
10 Date: Tue Nov 21 13:38:38 2023 +0000
11
12 btrfs: use a dedicated data structure for chunk maps
13
14 Currently we abuse the extent_map structure for two purposes:
15
16 1) To actually represent extents for inodes;
17 2) To represent chunk mappings.
18
19 This is odd and has several disadvantages:
20
21 1) To create a chunk map, we need to do two memory allocations: one for
22 an extent_map structure and another one for a map_lookup structure, so
23 more potential for an allocation failure and more complicated code to
24 manage and link two structures;
25
26 2) For a chunk map we actually only use 3 fields (24 bytes) of the
27 respective extent map structure: the 'start' field to have the logical
28 start address of the chunk, the 'len' field to have the chunk's size,
29 and the 'orig_block_len' field to contain the chunk's stripe size.
30
31 Besides wasting a memory, it's also odd and not intuitive at all to
32 have the stripe size in a field named 'orig_block_len'.
33
34 We are also using 'block_len' of the extent_map structure to contain
35 the chunk size, so we have 2 fields for the same value, 'len' and
36 'block_len', which is pointless;
37
38 3) When an extent map is associated to a chunk mapping, we set the bit
39 EXTENT_FLAG_FS_MAPPING on its flags and then make its member named
40 'map_lookup' point to the associated map_lookup structure. This means
41 that for an extent map associated to an inode extent, we are not using
42 this 'map_lookup' pointer, so wasting 8 bytes (on a 64 bits platform);
43
44 4) Extent maps associated to a chunk mapping are never merged or split so
45 it's pointless to use the existing extent map infrastructure.
46
47 So add a dedicated data structure named 'btrfs_chunk_map' to represent
48 chunk mappings, this is basically the existing map_lookup structure with
49 some extra fields:
50
51 1) 'start' to contain the chunk logical address;
52 2) 'chunk_len' to contain the chunk's length;
53 3) 'stripe_size' for the stripe size;
54 4) 'rb_node' for insertion into a rb tree;
55 5) 'refs' for reference counting.
56
57 This way we do a single memory allocation for chunk mappings and we don't
58 waste memory for them with unused/unnecessary fields from an extent_map.
59
60 We also save 8 bytes from the extent_map structure by removing the
61 'map_lookup' pointer, so the size of struct extent_map is reduced from
62 144 bytes down to 136 bytes, and we can now have 30 extents map per 4K
63 page instead of 28.
64
65Upstream-Status: Backport [Uhttps://review.lttng.org/c/lttng-modules/+/11700]
66
67Change-Id: Ie52b5ac83df4bc6abeb84d958c4f5d24ae0d8c75
68Signed-off-by: Kienan Stewart <kstewart@efficios.com>
69Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
70---
71 include/instrumentation/events/btrfs.h | 37 +++++++++++++++++++++++++-
72 1 file changed, 36 insertions(+), 1 deletion(-)
73
74diff --git a/include/instrumentation/events/btrfs.h b/include/instrumentation/events/btrfs.h
75index 7c7b9b0..a2a412b 100644
76--- a/include/instrumentation/events/btrfs.h
77+++ b/include/instrumentation/events/btrfs.h
78@@ -1609,7 +1609,42 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head,
79 )
80 #endif
81
82-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
83+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
84+
85+LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
86+
87+ TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *map,
88+ u64 offset, u64 size),
89+
90+ TP_ARGS(fs_info, map, offset, size),
91+
92+ TP_FIELDS(
93+ ctf_integer(int, num_stripes, map->num_stripes)
94+ ctf_integer(u64, type, map->type)
95+ ctf_integer(int, sub_stripes, map->sub_stripes)
96+ ctf_integer(u64, offset, offset)
97+ ctf_integer(u64, size, size)
98+ ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid)
99+ )
100+)
101+
102+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
103+
104+ TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *map,
105+ u64 offset, u64 size),
106+
107+ TP_ARGS(fs_info, map, offset, size)
108+)
109+
110+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
111+
112+ TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *map,
113+ u64 offset, u64 size),
114+
115+ TP_ARGS(fs_info, map, offset, size)
116+)
117+
118+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
119
120 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
121
122--
1232.39.2
124
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch b/meta/recipes-kernel/lttng/lttng-modules/0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch
deleted file mode 100644
index 65c33dafef..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch
+++ /dev/null
@@ -1,88 +0,0 @@
1From 86db094386b43bb5c6b47552f9a4826ca8ba917d Mon Sep 17 00:00:00 2001
2From: Kienan Stewart <kstewart@efficios.com>
3Date: Mon, 22 Jan 2024 13:13:36 -0500
4Subject: [PATCH 5/5] Fix: btrfs_get_extent flags and compress_type changed in
5 linux 6.8.0-rc1
6
7See upstream commit:
8
9 commit f86f7a75e2fb5fd7d31d00eab8a392f97ba42ce9
10 Author: Filipe Manana <fdmanana@suse.com>
11 Date: Mon Dec 4 16:20:33 2023 +0000
12
13 btrfs: use the flags of an extent map to identify the compression type
14
15 Currently, in struct extent_map, we use an unsigned int (32 bits) to
16 identify the compression type of an extent and an unsigned long (64 bits
17 on a 64 bits platform, 32 bits otherwise) for flags. We are only using
18 6 different flags, so an unsigned long is excessive and we can use flags
19 to identify the compression type instead of using a dedicated 32 bits
20 field.
21
22 We can easily have tens or hundreds of thousands (or more) of extent maps
23 on busy and large filesystems, specially with compression enabled or many
24 or large files with tons of small extents. So it's convenient to have the
25 extent_map structure as small as possible in order to use less memory.
26
27 So remove the compression type field from struct extent_map, use flags
28 to identify the compression type and shorten the flags field from an
29 unsigned long to a u32. This saves 8 bytes (on 64 bits platforms) and
30 reduces the size of the structure from 136 bytes down to 128 bytes, using
31 now only two cache lines, and increases the number of extent maps we can
32 have per 4K page from 30 to 32. By using a u32 for the flags instead of
33 an unsigned long, we no longer use test_bit(), set_bit() and clear_bit(),
34 but that level of atomicity is not needed as most flags are never cleared
35 once set (before adding an extent map to the tree), and the ones that can
36 be cleared or set after an extent map is added to the tree, are always
37 performed while holding the write lock on the extent map tree, while the
38 reader holds a lock on the tree or tests for a flag that never changes
39 once the extent map is in the tree (such as compression flags).
40
41Upstream-Status: Backport [Uhttps://review.lttng.org/c/lttng-modules/+/11700]
42
43Change-Id: I95402d43f064c016b423b48652e4968d3db9b8a9
44Signed-off-by: Kienan Stewart <kstewart@efficios.com>
45Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
46---
47 include/instrumentation/events/btrfs.h | 25 ++++++++++++++++++++++++-
48 1 file changed, 24 insertions(+), 1 deletion(-)
49
50diff --git a/include/instrumentation/events/btrfs.h b/include/instrumentation/events/btrfs.h
51index a2a412b..ffb1b64 100644
52--- a/include/instrumentation/events/btrfs.h
53+++ b/include/instrumentation/events/btrfs.h
54@@ -177,7 +177,30 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
55 )
56 #endif
57
58-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
59+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
60+
61+LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
62+
63+ TP_PROTO(const struct btrfs_root *root, const struct btrfs_inode *inode,
64+ const struct extent_map *map),
65+
66+ TP_ARGS(root, inode, map),
67+
68+ TP_FIELDS(
69+ ctf_integer(u64, root_objectid, root->root_key.objectid)
70+ ctf_integer(u64, ino, btrfs_ino(inode))
71+ ctf_integer(u64, start, map->start)
72+ ctf_integer(u64, len, map->len)
73+ ctf_integer(u64, orig_start, map->orig_start)
74+ ctf_integer(u64, block_start, map->block_start)
75+ ctf_integer(u64, block_len, map->block_len)
76+ ctf_integer(unsigned int, flags, map->flags)
77+ ctf_integer(int, refs, refcount_read(&map->refs))
78+ ctf_integer(unsigned int, compress_type, extent_map_compression(map))
79+ )
80+)
81+
82+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
83
84 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
85
86--
872.39.2
88
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0006-Fix-ext4_discard_preallocations-changed-in-linux-6.8.patch b/meta/recipes-kernel/lttng/lttng-modules/0006-Fix-ext4_discard_preallocations-changed-in-linux-6.8.patch
deleted file mode 100644
index c35f5b61fa..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/0006-Fix-ext4_discard_preallocations-changed-in-linux-6.8.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1From c1e074414f087b6ecc229a9385a44eb3b3dfeaea Mon Sep 17 00:00:00 2001
2From: Kienan Stewart <kstewart@efficios.com>
3Date: Mon, 5 Feb 2024 08:52:29 -0500
4Subject: [PATCH] Fix: ext4_discard_preallocations changed in linux 6.8.0-rc3
5
6See upstream commit:
7
8 commit f0e54b6087de9571ec61c189d6c378b81edbe3b2
9 Author: Kemeng Shi <shikemeng@huaweicloud.com>
10 Date: Fri Jan 5 17:21:02 2024 +0800
11
12 ext4: remove 'needed' in trace_ext4_discard_preallocations
13
14 As 'needed' to trace_ext4_discard_preallocations is always 0 which
15 is meaningless. Just remove it.
16
17Change-Id: Ib6b698ca553c4beebd4ca791c83bbbb927901758
18Signed-off-by: Kienan Stewart <kstewart@efficios.com>
19Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
20
21Upstream-Status: Backport [https://github.com/lttng/lttng-modules/commit/2da4de37de6382b4440737fdf4320e08a089afcd]
22
23Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
24---
25 include/instrumentation/events/ext4.h | 14 +++++++++++++-
26 1 file changed, 13 insertions(+), 1 deletion(-)
27
28diff --git a/include/instrumentation/events/ext4.h b/include/instrumentation/events/ext4.h
29index 222416e..05a6453 100644
30--- a/include/instrumentation/events/ext4.h
31+++ b/include/instrumentation/events/ext4.h
32@@ -490,7 +490,19 @@ LTTNG_TRACEPOINT_EVENT(ext4_mb_release_group_pa,
33 )
34 #endif
35
36-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0) || \
37+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
38+LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations,
39+ TP_PROTO(struct inode *inode, unsigned int len),
40+
41+ TP_ARGS(inode, len),
42+
43+ TP_FIELDS(
44+ ctf_integer(dev_t, dev, inode->i_sb->s_dev)
45+ ctf_integer(ino_t, ino, inode->i_ino)
46+ ctf_integer(unsigned int, len, len)
47+ )
48+)
49+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0) || \
50 LTTNG_KERNEL_RANGE(5,8,6, 5,9,0))
51 LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations,
52 TP_PROTO(struct inode *inode, unsigned int len, unsigned int needed),
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.13.11.bb b/meta/recipes-kernel/lttng/lttng-modules_2.13.13.bb
index 5d2379df84..75b144757a 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.13.11.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.13.13.bb
@@ -10,18 +10,16 @@ inherit module
10include lttng-platforms.inc 10include lttng-platforms.inc
11 11
12SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ 12SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
13 file://0001-Fix-sched_stat_runtime-changed-in-linux-6.8.0-rc1.patch \ 13 file://0001-fix-btrfs-simplify-delayed-ref-tracepoints-v6.10.patch \
14 file://0002-Fix-timer_start-changed-in-linux-6.8.0-rc1.patch \ 14 file://0002-fix-btrfs-move-parent-and-ref_root-into-btrfs_delaye.patch \
15 file://0003-Fix-strlcopy-removed-in-linux-6.8.0-rc1.patch \ 15 file://0003-fix-net-udp-add-IP-port-data-to-the-tracepoint-udp-u.patch \
16 file://0004-Fix-btrfs_chunk-tracepoints-changed-in-linux-6.8.0-r.patch \ 16 file://0001-fix-close_on_exec-pass-files_struct-instead-of-fdtab.patch \
17 file://0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch \
18 file://0006-Fix-ext4_discard_preallocations-changed-in-linux-6.8.patch \
19 " 17 "
20 18
21# Use :append here so that the patch is applied also when using devupstream 19# Use :append here so that the patch is applied also when using devupstream
22SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch" 20SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch"
23 21
24SRC_URI[sha256sum] = "297211d6fda459c85793c1f498c90fad2939cda7939d503f3ec5eaaf5fbec3c7" 22SRC_URI[sha256sum] = "7d26c07a5e80b66aa7bdcfdaaf4857f00fc9a5cdde79226b2528676700d50228"
25 23
26export INSTALL_MOD_DIR="kernel/lttng-modules" 24export INSTALL_MOD_DIR="kernel/lttng-modules"
27 25
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch
new file mode 100644
index 0000000000..3286dfb5c1
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch
@@ -0,0 +1,56 @@
1From 6b45c5f80d20e7bbf3d98c1fa17d2cf8716af3bb Mon Sep 17 00:00:00 2001
2From: Xiangyu Chen <xiangyu.chen@windriver.com>
3Date: Mon, 25 Mar 2024 18:20:14 +0800
4Subject: [PATCH] Fix: rotation-destroy-flush: fix session daemon abort if no
5 kernel module present
6
7Testing rotation-destroy-flush when no lttng kernel modules present, it would
8be failed with error message:
9
10 Error: Unable to load required module lttng-ring-buffer-client-discard
11 not ok 1 - Start session daemon
12 Failed test 'Start session daemon'
13 not ok 2 - Create session rotation_destroy_flush in -o /tmp/tmp.test_rot ...
14 ...
15
16This because test script that sets the LTTNG_ABORT_ON_ERROR environment
17variable. It's this environment variable that causes the sessiond to handle the
18kernel module loading failure as an abort rather than a warning.
19
20Using "check_skip_kernel_test" to detect whether the kernel module fails to
21load is expected or not. If the failure is expected, the script won't set that
22environment variable any more.
23
24Fixes: 3a174400
25("tests:add check_skip_kernel_test to check root user and lttng kernel modules")
26
27Upstream-Status: Submitted [https://review.lttng.org/c/lttng-tools/+/12155]
28
29Change-Id: I371e9ba717613e2940186f710cf3cccd35baed6c
30Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
31---
32 .../ust/rotation-destroy-flush/test_rotation_destroy_flush | 6 +++---
33 1 file changed, 3 insertions(+), 3 deletions(-)
34
35diff --git a/tests/regression/ust/rotation-destroy-flush/test_rotation_destroy_flush b/tests/regression/ust/rotation-destroy-flush/test_rotation_destroy_flush
36index 669bcbc43..64161768f 100755
37--- a/tests/regression/ust/rotation-destroy-flush/test_rotation_destroy_flush
38+++ b/tests/regression/ust/rotation-destroy-flush/test_rotation_destroy_flush
39@@ -23,11 +23,11 @@ SIZE_LIMIT=$PAGE_SIZE
40 NR_ITER=10
41 NUM_TESTS=$((15*$NR_ITER))
42
43-# Ensure the daemons invoke abort on error.
44-export LTTNG_ABORT_ON_ERROR=1
45-
46 source $TESTDIR/utils/utils.sh
47
48+# Ensure the daemons invoke abort on error.
49+check_skip_kernel_test || export LTTNG_ABORT_ON_ERROR=1
50+
51 # MUST set TESTDIR before calling those functions
52 function run_app()
53 {
54--
552.25.1
56
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-tests-do-not-strip-a-helper-library.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-tests-do-not-strip-a-helper-library.patch
index 2d08b08879..2f95889c4b 100644
--- a/meta/recipes-kernel/lttng/lttng-tools/0001-tests-do-not-strip-a-helper-library.patch
+++ b/meta/recipes-kernel/lttng/lttng-tools/0001-tests-do-not-strip-a-helper-library.patch
@@ -1,4 +1,4 @@
1From ab238c213fac190972f55e73cf3e0bb1c7846eb8 Mon Sep 17 00:00:00 2001 1From 2237748af00467ad8250a7ccd944200f811db69a Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 12 Dec 2019 16:52:07 +0100 3Date: Thu, 12 Dec 2019 16:52:07 +0100
4Subject: [PATCH] tests: do not strip a helper library 4Subject: [PATCH] tests: do not strip a helper library
@@ -10,10 +10,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
10 1 file changed, 1 insertion(+), 1 deletion(-) 10 1 file changed, 1 insertion(+), 1 deletion(-)
11 11
12diff --git a/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am b/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am 12diff --git a/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am b/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
13index 03f5d5a..d12c343 100644 13index 836f13e..e19a554 100644
14--- a/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am 14--- a/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
15+++ b/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am 15+++ b/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
16@@ -12,7 +12,7 @@ userspace_probe_elf_binary_LDADD = libfoo.la 16@@ -14,7 +14,7 @@ userspace_probe_elf_binary_LDADD = libfoo.la
17 libfoo.strip: libfoo.la 17 libfoo.strip: libfoo.la
18 $(OBJCOPY) --strip-all .libs/libfoo.so 18 $(OBJCOPY) --strip-all .libs/libfoo.so
19 19
@@ -22,6 +22,3 @@ index 03f5d5a..d12c343 100644
22 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ 22 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
23 for script in $(EXTRA_DIST); do \ 23 for script in $(EXTRA_DIST); do \
24 cp -f $(srcdir)/$$script $(builddir); \ 24 cp -f $(srcdir)/$$script $(builddir); \
25--
262.17.1
27
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.13.11.bb b/meta/recipes-kernel/lttng/lttng-tools_2.13.13.bb
index 08144e271c..e73dd4801a 100644
--- a/meta/recipes-kernel/lttng/lttng-tools_2.13.11.bb
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.13.13.bb
@@ -38,9 +38,10 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
38 file://disable-tests.patch \ 38 file://disable-tests.patch \
39 file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \ 39 file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \
40 file://0001-tests-add-check_skip_kernel_test-to-check-root-user-.patch \ 40 file://0001-tests-add-check_skip_kernel_test-to-check-root-user-.patch \
41 file://0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch \
41 " 42 "
42 43
43SRC_URI[sha256sum] = "ac5baeef9fa690936b1ca01ecd1742da762c2c08511ff1b4e923938d94d0f979" 44SRC_URI[sha256sum] = "ff5f4f00b081dac66092afe8e72b7c790670931cf1c1ee0deaa7f80fbc53883e"
44 45
45inherit autotools ptest pkgconfig useradd python3-dir manpages systemd 46inherit autotools ptest pkgconfig useradd python3-dir manpages systemd
46 47
@@ -68,7 +69,7 @@ PRIVATE_LIBS:${PN}-ptest = "libfoo.so"
68do_install:append () { 69do_install:append () {
69 # install systemd unit file 70 # install systemd unit file
70 install -d ${D}${systemd_system_unitdir} 71 install -d ${D}${systemd_system_unitdir}
71 install -m 0644 ${WORKDIR}/lttng-sessiond.service ${D}${systemd_system_unitdir} 72 install -m 0644 ${UNPACKDIR}/lttng-sessiond.service ${D}${systemd_system_unitdir}
72} 73}
73 74
74do_install_ptest () { 75do_install_ptest () {
diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.13.7.bb b/meta/recipes-kernel/lttng/lttng-ust_2.13.8.bb
index 9509185bad..dddd3a5004 100644
--- a/meta/recipes-kernel/lttng/lttng-ust_2.13.7.bb
+++ b/meta/recipes-kernel/lttng/lttng-ust_2.13.8.bb
@@ -34,7 +34,7 @@ SRC_URI = "https://lttng.org/files/lttng-ust/lttng-ust-${PV}.tar.bz2 \
34 file://0001-Makefile.am-update-rpath-link.patch \ 34 file://0001-Makefile.am-update-rpath-link.patch \
35 " 35 "
36 36
37SRC_URI[sha256sum] = "5fb4f17c307c8c1b79c68561e89be9562d07e7425bf40e728c4d66755342a5eb" 37SRC_URI[sha256sum] = "d4ef98dab9a37ad4f524ccafdfd50af4f266039b528dd5afabce78e49024d937"
38 38
39CVE_PRODUCT = "ust" 39CVE_PRODUCT = "ust"
40 40