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: <20091202201635.GA5141@nowhere>
Date:	Wed, 2 Dec 2009 21:16:38 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
	akpm@...ux-foundation.org, Ingo Molnar <mingo@...e.hu>,
	mingo@...hat.com, hpa@...or.com, randy.dunlap@...cle.com,
	wcohen@...hat.com, tglx@...utronix.de, jbaron@...hat.com,
	mhiramat@...hat.com, linux-tip-commits@...r.kernel.org,
	Christoph Hellwig <hch@....de>
Subject: Re: [PATCH][tip/perf/core] tracing: Rename TRACE_EVENT and others
	to something resonable

On Wed, Dec 02, 2009 at 03:11:23PM -0500, Steven Rostedt wrote:
> With the addition of TRACE_EVENT templates (or classes) the issue of
> naming has come up.
> 
> Originally, the template was called TRACE_EVENT_TEMPLATE. This was to be
> used to consolidate similar TRACE_EVENTs because a single TRACE_EVENT
> takes up quite a bit of code. One TRACE_EVENT creates a function to
> register and unregister a trace point, a function to record the event in
> a buffer, a function to display the binary output to user space, a
> function to add counters to record the number of times the event is
> reached, and so on.
> 
> All these functions creates a lot of bloat, especially since these
> functions are almost identical to each other. Unfortunately, these
> functions require specific parameters and structure fields, and can't
> always be the same. But for those events that share the same structure
> and parameters, a class/template allows them to share the same functions
> and this cuts down the bloat substantially.
> 
> But what to call these macros to satisfy the already confused kernel
> developers?
> 
> Ideally, DECLARE_EVENT_CLASS to create the class, DEFINE_EVENT to create
> an instance of the class, and even DEFINE_EVENT_CLASS to replace the
> current TRACE_EVENT that defines a class and creates an event of the
> same name as the class. New DEFINE_EVENTs may also reference a class
> declared by DEFINE_EVENT_CLASS.
> 
> But us kernel developers stay up too late at night, drinking jolt (or
> beer if you are in Europe), and our brain cells have fused to only
> logical circuitry, thus understanding concepts that are not engraved in
> stone becomes a bit too straining for us, and we may finally have to
> give up on solving this one last bug to get some rest with our love one
> that's been sleeping since 9pm.
> 
> This means using DECLARE_* and DEFINE_* will push us over that brink to
> normalcy and must be avoided. A new name must be established to clearly
> describe the mystical CPP magic that comprises the TRACE_EVENT hackery.
> Something that can bring us back to our roots. Something where it all
> begins. The stone age.
> 
> Thus, this patch renames the MACROS to the most obvious definitions
> around. Something we should have thought of at the start.
> 
> 
> s/DEFINE_EVENT_CLASS/FRED/g
> s/DEFINE_EVENT/WILMA/g
> s/TRACE_EVENT/BARNEY/g
> 
> 
> Thus with the new naming convention:
> 
> FRED(x, ...) -- will declare a class but will not make any events
> WILMA(x, y, ...) -- will create an event based off of class made by FRED
> BARNEY(x, ...) -- will create both a class and an event
> 
> /* Little known secret, WILMA can also fool around with BARNEY and can
> create new events with BARNEY as well as with FRED */
> 
>   (apologies to Thomas Gleixner and his renaming to "fred")
> 
> Signed-off-by: Steven Rostedt <flintstone@...dmis.org>


Acked-by: Frederic Weisbecker <fweisbec@...il.com>

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ