Skip to contentSkip to conversation

time/tracing: Make jiffies_64_to_clock_t() notrace

PATCH Applied Steven Rostedt 2 participants 2 messages Mar 7 – Mar 11

Subsystems (2)
lore
Share & tools
lore

Steven Rostedt

author maintainer
#0 lore raw

PATCH 1/1 time/tracing: Make jiffies_64_to_clock_t() notrace

From: Steven Rostedt <[email protected]>

The trace_clock_jiffies() function that handles the "uptime" clock for tracing calls jiffies_64_to_clock_t(). This causes the function tracer to constantly recurse when the tracing clock is set to "uptime". Mark it notrace to prevent unnecessary recursion when using the "uptime" clock.

Fixes 58d4e21e50ff3 ("tracing: Fix wraparound problems in "uptime" trace clock")
---
 kernel/time/time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/time.c +1 -1
index 36fd2313ae7e..0d832317d576 100644
@@ -697,7 +697,7 @@ EXPORT_SYMBOL(clock_t_to_jiffies);
  *
  * Return: jiffies_64 value converted to 64-bit "clock_t" (CLOCKS_PER_SEC)
  */
-u64 jiffies_64_to_clock_t(u64 x)
+notrace u64 jiffies_64_to_clock_t(u64 x)
 {
 #if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0
 # if HZ < USER_HZ
Signature · 1 line
2.51.0
merge bot Applied
#1 lore raw

[tip: timers/urgent] time/jiffies: Mark jiffies_64_to_clock_t() notrace

The following commit has been merged into the timers/urgent branch of tip:

The following commit has been merged into the timers/urgent branch of tip:

Commit-ID:     755a648e78f12574482d4698d877375793867fa1
Gitweb:        https://git.kernel.org/tip/755a648e78f12574482d4698d877375793867fa1
Author:        Steven Rostedt <[email protected]>
AuthorDate:    Fri, 06 Mar 2026 21:24:03 -05:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Wed, 11 Mar 2026 10:33:12 +01:00

time/jiffies: Mark jiffies_64_to_clock_t() notrace

The trace_clock_jiffies() function that handles the "uptime" clock for tracing calls jiffies_64_to_clock_t(). This causes the function tracer to constantly recurse when the tracing clock is set to "uptime". Mark it notrace to prevent unnecessary recursion when using the "uptime" clock.

Fixes 58d4e21e50ff3 ("tracing: Fix wraparound problems in "uptime" trace clock")
---
 kernel/time/time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/time.c +1 -1
index 36fd231..0d83231 100644
@@ -697,7 +697,7 @@ EXPORT_SYMBOL(clock_t_to_jiffies);
  *
  * Return: jiffies_64 value converted to 64-bit "clock_t" (CLOCKS_PER_SEC)
  */
-u64 jiffies_64_to_clock_t(u64 x)
+notrace u64 jiffies_64_to_clock_t(u64 x)
 {
 #if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0
 # if HZ < USER_HZ