Re: [PATCH] tracing/events: Add timer and high res timertracepoints

From: Steven Rostedt
Date: Wed May 20 2009 - 20:13:36 EST



On Thu, 21 May 2009, Frédéric Weisbecker wrote:

> 2009/5/20 Anton Blanchard <anton@xxxxxxxxx>:
> > +/**
> > + * timer_entry - called immediately before the timer
> > + * @timer: pointer to struct timer_list
> > + *
> > + * When used in combination with the timer_exit tracepoint we can
> > + * determine the timer latency.
> > + */
> > +TRACE_EVENT(timer_entry,
> > +
> > +       TP_PROTO(struct timer_list *timer),
> > +
> > +       TP_ARGS(timer),
> > +
> > +       TP_STRUCT__entry(
> > +               __field(void *, function)
>
>
>
> void * won't make the filtering easier.
> It would require the raw address whereas it would be nice to filter
> by function name.
>
> But saving the address instead of the resolved name is faster.
>
> I guess we should add a filter feature to resolve a function name to
> its address.

Yeah, I think that would be the better approach. This should be easy since
the function pointers being saved are the actual address of the function
and not an offset into the function. A simple filter on kallsyms should be
enough.

-- Steve