Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756978Ab0D2AU0 (ORCPT ); Wed, 28 Apr 2010 20:20:26 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.124]:41931 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754411Ab0D2AUZ (ORCPT ); Wed, 28 Apr 2010 20:20:25 -0400 X-Authority-Analysis: v=1.1 cv=2/WNtoURsBD4grC4Rqfj62/w1mAETqRJkFX1sgq41IM= c=1 sm=0 a=h2TIy-q3F9wA:10 a=7U3hwN5JcxgA:10 a=Q9fys5e9bTEA:10 a=gMqfjgEr1zLu/65IO0LwxA==:17 a=meVymXHHAAAA:8 a=d4pSGnrRlpIvyoWo86QA:9 a=n88BPIicb6Pl1WLiEqyUB3xPqL0A:4 a=PUjeQqilurYA:10 a=jeBq3FmKZ4MA:10 a=gMqfjgEr1zLu/65IO0LwxA==:117 X-Cloudmark-Score: 0 X-Originating-IP: 74.67.89.75 Subject: Re: [PATCH 04/10][RFC] tracing: Remove per event trace registering From: Steven Rostedt Reply-To: rostedt@goodmis.org To: Mathieu Desnoyers Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Thomas Gleixner , Peter Zijlstra , Frederic Weisbecker , Arnaldo Carvalho de Melo , Lai Jiangshan , Li Zefan , Masami Hiramatsu , Christoph Hellwig In-Reply-To: <20100429000528.GB30353@Krystal> References: <20100426195024.256424113@goodmis.org> <20100426200242.214837703@goodmis.org> <20100428204448.GE8591@Krystal> <1272499218.9739.86.camel@gandalf.stny.rr.com> <20100429000528.GB30353@Krystal> Content-Type: text/plain; charset="ISO-8859-15" Organization: Kihon Technologies Inc. Date: Wed, 28 Apr 2010 20:20:22 -0400 Message-ID: <1272500422.9739.98.camel@gandalf.stny.rr.com> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1502 Lines: 35 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/