[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1272500422.9739.98.camel@gandalf.stny.rr.com>
Date: Wed, 28 Apr 2010 20:20:22 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Mathieu Desnoyers <compudj@...stal.dyndns.org>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Lai Jiangshan <laijs@...fujitsu.com>,
Li Zefan <lizf@...fujitsu.com>,
Masami Hiramatsu <mhiramat@...hat.com>,
Christoph Hellwig <hch@....de>
Subject: Re: [PATCH 04/10][RFC] tracing: Remove per event trace registering
On Wed, 2010-04-28 at 20:05 -0400, Mathieu Desnoyers wrote:
> * Steven Rostedt (rostedt@...dmis.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists