Messages in this thread | | | Subject | Re: [PATCH 04/10][RFC] tracing: Remove per event trace registering | From | Steven Rostedt <> | Date | Wed, 28 Apr 2010 20:20:22 -0400 |
| |
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
| |