[PATCH RFC] powerpc/ftrace: add powerpc timebase as a trace clock source

Naveen N. Rao naveen.n.rao at linux.vnet.ibm.com
Wed Apr 22 15:18:55 AEST 2015


On 2015/04/21 09:25AM, Steven Rostedt wrote:
> On Tue, 21 Apr 2015 16:33:36 +0530
> "Naveen N. Rao" <naveen.n.rao at linux.vnet.ibm.com> wrote:
> 
> > Add a new powerpc-specific trace clock using the timebase register,
> > similar to x86-tsc. This gives us a fast, monotonic, cross-cpu clock
> > for trace entries and can be used to correlate events across cpus as
> > well as across hypervisor and guest (assuming it is not a migrated guest
> > with a non-zero tb_offset).
> > 
> > Signed-off-by: Naveen N. Rao <naveen.n.rao at linux.vnet.ibm.com>
> > ---
> > I have followed the approach used by x86-tsc here, but we could get rid of
> > trace_clock.c if we directly use get_tb() with perhaps the notrace annotation.
> > Would that be preferable?
> > 
> 
> Probably. But all clocks used by tracing should be marked by notrace.
> Don't just wrap it with a notrace. But looking at the code, it seems
> that get_tb() is a static inline, which wont work as a pointer. Seems
> you still need the indirect function call.
> 
> Note, all "inline" functions are notrace by default, so you do not need
> to add any notrace annotation to an inlined function.

Steve,
Thanks for the clarification - the current approach is better in that 
case.

Paul, Mike,
Can you please let me know your thoughts on this?


- Naveen



More information about the Linuxppc-dev mailing list