lkml.org 
[lkml]   [2010]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 04/10][RFC] tracing: Remove per event trace registering
From
Date
On Wed, 2010-04-28 at 20:05 -0400, Mathieu Desnoyers wrote:
> * Steven Rostedt (rostedt@goodmis.org) wrote:

> > > Have you tried doing a BUILD_BUG_ON() on __typeof__() mismatch between
> > > the type of the callback generated by TRACE_EVENT() and the expected
> > > type ? This might help catching tricky preprocessor macro errors early.
> >
> > Well, we could, but if it is broken once, it is broken everywhere.
>
> I fear about "subtly" broken things, where trace data could end up being
> incorrectly typed and/or corrupted. I think this BUILD_BUG_ON() will
> become very useful.

Actually, I'm not sure what you want to check. What is not checked is
the prototype that is created, to the prototype that is passed to the
tracepoint_probe_register. Other parts are still checked. If you
mis-match the args with the parameters, there are still places that the
compiler will flag it. There really is not much less protection here
than there was before.

Instead of calling register_trace_##name that is created for each
tracepoint, we now call the tracepoint_probe_register() directly in the
C file with the generated probe.

Both the probe and the tracepoint are created from the same data. I'm
not seeing where you want to add this check.

-- Steve




\
 
 \ /
  Last update: 2010-04-29 02:23    [W:0.043 / U:0.084 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site