tracing: Use sched_clock_cpu for trace_clock_global
authorNamhyung Kim <namhyung.kim@lge.com>
Thu, 27 Dec 2012 02:49:45 +0000 (11:49 +0900)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 30 Jan 2013 16:02:05 +0000 (11:02 -0500)
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>
kernel/trace/trace_clock.c

index 22b638b28e48799673139af07f005ced1643c777..24bf48eabfcc954d4cd2460ce081dd407e052f68 100644 (file)
@@ -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: