lkml.org 
[lkml]   [2012]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] tracing: Use sched_clock_cpu for trace_clock_global
Date
From: Namhyung Kim <namhyung.kim@lge.com>

For systems have unstable sched_clock, all cpu_clock() does is enable/
disable local irq during call to sched_clock(). And for stable systems
they are same.

As in trace_clock_global(), we already does it for local irq, calling
sched_clock_cpu() directly would be appropriate.

Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Fredereic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
kernel/trace/trace_clock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c
index 394783531cbb..795f077978a8 100644
--- a/kernel/trace/trace_clock.c
+++ b/kernel/trace/trace_clock.c
@@ -86,7 +86,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:
--
1.7.11.7


\
 
 \ /
  Last update: 2012-12-27 04:41    [W:2.856 / U:2.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site