summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-timer_start-changed-in-linux-6.8.0-rc1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-modules/0002-Fix-timer_start-changed-in-linux-6.8.0-rc1.patch')
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/0002-Fix-timer_start-changed-in-linux-6.8.0-rc1.patch100
1 files changed, 100 insertions, 0 deletions
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
new file mode 100644
index 0000000000..5a4294db02
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/0002-Fix-timer_start-changed-in-linux-6.8.0-rc1.patch
@@ -0,0 +1,100 @@
+From d52ab4b9a71a4bef535dadb8e7062112ac5c0c88 Mon Sep 17 00:00:00 2001
+From: Kienan Stewart <kstewart@efficios.com>
+Date: Mon, 22 Jan 2024 11:33:39 -0500
+Subject: [PATCH 2/5] Fix: timer_start changed in linux 6.8.0-rc1
+
+See upstream commit
+
+ commit dbcdcb62b59db2cf6a24113873b90da15c6f0b19
+ Author: Anna-Maria Behnsen <anna-maria@linutronix.de>
+ Date: Fri Dec 1 10:26:26 2023 +0100
+
+ tracing/timers: Enhance timer_start tracepoint
+
+ For starting a timer, the timer is enqueued into a bucket of the timer
+ wheel. The bucket expiry is the defacto expiry of the timer but it is not
+ equal the timer expiry because of increasing granularity when bucket is in
+ a higher level of the wheel. To be able to figure out in a trace whether a
+ timer expired in time or not, the bucket expiry time is required as well.
+
+ Add bucket expiry time to the timer_start tracepoint and thereby simplify
+ the arguments.
+
+Upstream-Status: Backport [Uhttps://review.lttng.org/c/lttng-modules/+/11700]
+
+Change-Id: I4868092765745b1efd0c48f13c0b837f2007dcb6
+Signed-off-by: Kienan Stewart <kstewart@efficios.com>
+Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
+---
+ include/instrumentation/events/timer.h | 24 +++++++++++++-----------
+ 1 file changed, 13 insertions(+), 11 deletions(-)
+
+diff --git a/include/instrumentation/events/timer.h b/include/instrumentation/events/timer.h
+index 91a2cd9..ce571f5 100644
+--- a/include/instrumentation/events/timer.h
++++ b/include/instrumentation/events/timer.h
+@@ -45,8 +45,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(timer_class, timer_init,
+ TP_ARGS(timer)
+ )
+
+-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0) || \
+- LTTNG_RHEL_KERNEL_RANGE(3,10,0,957,0,0, 3,11,0,0,0,0))
++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
+ /**
+ * timer_start - called when the timer is started
+ * @timer: pointer to struct timer_list
+@@ -55,39 +54,42 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(timer_class, timer_init,
+ */
+ LTTNG_TRACEPOINT_EVENT(timer_start,
+
+- TP_PROTO(struct timer_list *timer, unsigned long expires,
+- unsigned int flags),
++ TP_PROTO(struct timer_list *timer, unsigned long bucket_expiry),
+
+- TP_ARGS(timer, expires, flags),
++ TP_ARGS(timer, bucket_expiry),
+
+ TP_FIELDS(
+ ctf_integer_hex(void *, timer, timer)
+ ctf_integer_hex(void *, function, timer->function)
+- ctf_integer(unsigned long, expires, expires)
++ ctf_integer(unsigned long, expires, timer->expires)
++ ctf_integer(unsigned long, bucket_expiry, bucket_expiry)
+ ctf_integer(unsigned long, now, jiffies)
+- ctf_integer(unsigned int, flags, flags)
++ ctf_integer(unsigned int, flags, timer->flags)
+ )
+ )
+-#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
++#else
+ /**
+ * timer_start - called when the timer is started
+ * @timer: pointer to struct timer_list
+ * @expires: the timers expiry time
++ * @flags: the timers expiry time
+ */
+ LTTNG_TRACEPOINT_EVENT(timer_start,
+
+- TP_PROTO(struct timer_list *timer, unsigned long expires),
++ TP_PROTO(struct timer_list *timer, unsigned long expires,
++ unsigned int flags),
+
+- TP_ARGS(timer, expires),
++ TP_ARGS(timer, expires, flags),
+
+ TP_FIELDS(
+ ctf_integer_hex(void *, timer, timer)
+ ctf_integer_hex(void *, function, timer->function)
+ ctf_integer(unsigned long, expires, expires)
+ ctf_integer(unsigned long, now, jiffies)
++ ctf_integer(unsigned int, flags, flags)
+ )
+ )
+-#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
++#endif
+
+ #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0) || \
+ LTTNG_RHEL_KERNEL_RANGE(4,18,0,193,0,0, 4,19,0,0,0,0))
+--
+2.39.2
+