Skip to content

Commit 5e67b51

Browse files
Namhyung Kimrostedt
authored andcommitted
tracing: Use sched_clock_cpu for trace_clock_global
For systems with an unstable sched_clock, all cpu_clock() does is enable/ disable local irq during the call to sched_clock_cpu(). And for stable systems they are same. trace_clock_global() already disables interrupts, so it can call sched_clock_cpu() directly. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
1 parent ad96470 commit 5e67b51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/trace_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ u64 notrace trace_clock_global(void)
8484
local_irq_save(flags);
8585

8686
this_cpu = raw_smp_processor_id();
87-
now = cpu_clock(this_cpu);
87+
now = sched_clock_cpu(this_cpu);
8888
/*
8989
* If in an NMI context then dont risk lockups and return the
9090
* cpu_clock() time:

0 commit comments

Comments
 (0)