Re: [PATCH 1/2] tracing/function-return-tracer: Make the function return tracer lockless

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Steven Rostedt <rostedt@...>, Linux Kernel <linux-kernel@...>, Peter Zijlstra <a.p.zijlstra@...>
Date: Thursday, November 13, 2008 - 8:36 am

2008/11/13 Ingo Molnar <mingo@elte.hu>:


Ok, so correct me if I'm wrong.
Global timestamp would be captured by using sched_clock().
That's what is done currently in ring_buffer_time_stamp()
And the global timestamp would be combination of a last global
timestamp and a relative position from now to this last at
each insertion in the ring-buffer (or tracing time capture). Am I right?
I don't really understand why you want to update with a cmpxchg loop...

And the local timestamp would be built through cpu_clock() with
absolute values at each captures? Because we can't consider
relative values since this is loosing sense between cpu. Unless we
have per_cpu relative values.....

Then, depending of the current_tracer, ring_buffer_time_stamp would
act as a wrapper:
if (current_tracer->time_flag == TIME_GLOBAL_COHERENT)
    return ring_buffer_global_timestamp();
else
    return ring_buffer_local_timestamp();

Or more efficient with a function pointer set at the same we change
the time flag for the current tracer.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] tracing/function-return-tracer: Make the functio..., Frederic Weisbecker, (Wed Nov 12, 5:47 pm)
Re: [PATCH 1/2] tracing/function-return-tracer: Make the fun..., Frédéric Weisbecker, (Thu Nov 13, 1:01 pm)
Re: [PATCH 1/2] tracing/function-return-tracer: Make the fun..., Frédéric Weisbecker, (Thu Nov 13, 1:46 pm)
Re: [PATCH 1/2] tracing/function-return-tracer: Make the fun..., Frédéric Weisbecker, (Thu Nov 13, 4:50 am)
Re: [PATCH 1/2] tracing/function-return-tracer: Make the fun..., Frédéric Weisbecker, (Thu Nov 13, 5:16 am)
Re: [PATCH 1/2] tracing/function-return-tracer: Make the fun..., Frédéric Weisbecker, (Thu Nov 13, 5:27 am)
Re: [PATCH 1/2] tracing/function-return-tracer: Make the fun..., Frédéric Weisbecker, (Thu Nov 13, 8:36 am)
Re: [PATCH 1/2] tracing/function-return-tracer: Make the fun..., Frédéric Weisbecker, (Thu Nov 13, 1:26 pm)
Re: [PATCH 1/2] tracing/function-return-tracer: Make the fun..., Frédéric Weisbecker, (Thu Nov 13, 4:06 pm)