Skip to content

Commit

Permalink
tracing: Use sched_clock_cpu for trace_clock_global
Browse files Browse the repository at this point in the history
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/1356576585-28782-2-git-send-email-namhyung@kernel.org

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Namhyung Kim authored and Steven Rostedt committed Jan 30, 2013
1 parent ad96470 commit 5e67b51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/trace_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ u64 notrace trace_clock_global(void)
local_irq_save(flags);

this_cpu = raw_smp_processor_id();
now = cpu_clock(this_cpu);
now = sched_clock_cpu(this_cpu);
/*
* If in an NMI context then dont risk lockups and return the
* cpu_clock() time:
Expand Down

0 comments on commit 5e67b51

Please sign in to comment.