lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 5 Mar 2009 12:23:23 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] tracing/function-graph-tracer: use the more
	lightweight local clock

On Thu, Mar 05, 2009 at 12:04:33PM +0100, Ingo Molnar wrote:
> 
> * Frederic Weisbecker <fweisbec@...il.com> wrote:
> 
> > Impact: decrease hangs risks with the graph tracer on slow systems
> > 
> > Since the function graph tracer can spend too much time on 
> > timer interrupts, it's better now to use the more lightweight 
> > local clock. Anyway, the function graph traces are more 
> > reliable on a per cpu trace.
> > 
> > Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> > ---
> >  arch/x86/kernel/ftrace.c             |    2 +-
> >  kernel/trace/trace_functions_graph.c |    2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
> > index 3925ec0..40960c2 100644
> > --- a/arch/x86/kernel/ftrace.c
> > +++ b/arch/x86/kernel/ftrace.c
> > @@ -436,7 +436,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
> >  		return;
> >  	}
> >  
> > -	calltime = cpu_clock(raw_smp_processor_id());
> > +	calltime = sched_clock();
> 
> I changed this to trace_clock_local() :-)
> 
> (btw, we should turn trace_clock_local() into an inline 
> function)


Ok.
 
> There will be one problem though: function trace elapsed time 
> measurements across idle. Those are not correctly measured by 
> the local clock.

Oh, why? If I'm not wrong it uses sched_clock() which uses tsc on x86.
And this register always goes forward at the same rate. Unless some
Cpu decrease their frequency while beeing idle for some time and then
become unreliable?

> 	Ingo

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ