Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756779Ab0D2AAW (ORCPT ); Wed, 28 Apr 2010 20:00:22 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.124]:62584 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754666Ab0D2AAU (ORCPT ); Wed, 28 Apr 2010 20:00:20 -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=20KFwNOVAAAA:8 a=JSyt9FIkP4MeKdWGTe4A:9 a=OaziLe85vxB-zzQQFsoA:7 a=oIo1oG0cqIgdIpxXSWuTO9CBr0MA:4 a=PUjeQqilurYA:10 a=jeBq3FmKZ4MA:10 a=jEp0ucaQiEUA: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: <20100428204448.GE8591@Krystal> References: <20100426195024.256424113@goodmis.org> <20100426200242.214837703@goodmis.org> <20100428204448.GE8591@Krystal> Content-Type: text/plain; charset="ISO-8859-15" Organization: Kihon Technologies Inc. Date: Wed, 28 Apr 2010 20:00:18 -0400 Message-ID: <1272499218.9739.86.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: 2461 Lines: 53 On Wed, 2010-04-28 at 16:44 -0400, Mathieu Desnoyers wrote: > * Steven Rostedt (rostedt@goodmis.org) wrote: > > From: Steven Rostedt > > > > This patch removes the register functions of TRACE_EVENT() to enable > > and disable tracepoints. The registering of a event is now down > > directly in the trace_events.c file. The tracepoint_probe_register() > > is now called directly. > > > > The prototypes are no longer type checked, but this should not be > > an issue since the tracepoints are created automatically by the > > macros. If a prototype is incorrect in the TRACE_EVENT() macro, then > > other macros will catch it. > > > > The trace_event_class structure now holds the probes to be called > > by the callbacks. This removes needing to have each event have > > a separate pointer for the probe. > > > > To handle kprobes and syscalls, since they register probes in a > > different manner, a "reg" field is added to the ftrace_event_class > > structure. If the "reg" field is assigned, then it will be called for > > enabling and disabling of the probe for either ftrace or perf. To let > > the reg function know what is happening, a new enum (trace_reg) is > > created that has the type of control that is needed. > > > > With this new rework, the 82 kernel events and 616 syscall events > > has their footprint dramatically lowered: > > > > text data bss dec hex filename > > 5788186 1337252 9351592 16477030 fb6b66 vmlinux.orig > > 5792282 1333796 9351592 16477670 fb6de6 vmlinux.class > > 5793448 1333780 9351592 16478820 fb7264 vmlinux.tracepoint > > 5796926 1337748 9351592 16486266 fb8f7a vmlinux.data > > 5774316 1306580 9351592 16432488 fabd68 vmlinux.regs > > > > The size went from 16477030 to 16432488, that's a total of 44K > > in savings. With tracepoints being continuously added, this is > > critical that the footprint becomes minimal. > > 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. -- 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/