lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bddfebe8-61b9-4fb7-b7e5-5b0664f2b47c@email.android.com>
Date:	Fri, 07 May 2010 08:42:30 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Frederic Weisbecker <fweisbec@...il.com>
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>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Mathieu Desnoyers <compudj@...stal.dyndns.org>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Li Zefan <lizf@...fujitsu.com>,
	Masami Hiramatsu <mhiramat@...hat.com>,
	Christoph Hellwig <hch@....de>
Subject: Re: [PATCH 3/9 - v2][RFC] tracing: Remove per event trace	registering



"Frederic Weisbecker" <fweisbec@...il.com> wrote:

>On Mon, May 03, 2010 at 11:40:48PM -0400, Steven Rostedt wrote:
>> From: Steven Rostedt <srostedt@...hat.com>
>> 
>> 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.
>
>
>
>Agreed. Typechecking matters for human code but not in this context.
>Considering that the tracepoint and the probe are created by the same
>CPP code, bugs will be tracked down quickly and located to a single
>place.
>
>
>
>
>> 
>> 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.
>> 
>> v2: Changed the callback probes to pass void * and typecast the
>>     value within the function.
>> 
>> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
>
>
>
>Very nice!!
>
>Acked-by: Frederic Weisbecker <fweisbec@...il.com>
>

Thanks! 

-- Steve 


-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ