Re: [RFC][PATCH 0/2] tracing: Add conditional to tracepoints

From: Mathieu Desnoyers
Date: Thu Dec 02 2010 - 20:43:17 EST


* Frederic Weisbecker (fweisbec@xxxxxxxxx) wrote:
> On Thu, Dec 02, 2010 at 05:36:54PM -0500, Steven Rostedt wrote:
> >
> > Note, another variant of this, is to move the test directly into the
> > _DO_TRACE() macro, and not call any registered event callbacks. This would
> > even speed it up faster when tracing is enabled. I did not do this
> > orginially because I just thought of it now as I wrote this change log ;-)
>
> Hehe :)
>
> Yeah indeed. And that looks fairly possible.

I'd very much prefer if the test is performed before the call, within
the block that contains the stack setup and the tracepoint function
call. Having an utterly low performance impact for the events that are
filtered out is very important for my client's use-cases. Also, moving
it outside of the tracepoint probe function allows us to filter only
once for all the registered handlers.

All it would require is to skip over the function call rather than doing
a "return".

For the rest, it looks nice. :-)

Thanks,

Mathieu

--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/