lkml.org 
[lkml]   [2012]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/2] tracing: Use sched_clock_cpu for trace_clock_global
Date
On Thu, 27 Dec 2012 11:49:45 +0900, Namhyung Kim wrote:
> 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

Oops, I meant s/sched_clock/scheck_clock_cpu/.

Thanks,
Namhyung


> 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:


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