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: <20091202231529.GC14770@Krystal>
Date:	Wed, 2 Dec 2009 18:15:29 -0500
From:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	Masami Hiramatsu <mhiramat@...hat.com>,
	akpm@...ux-foundation.org, Ingo Molnar <mingo@...e.hu>,
	mingo@...hat.com, linux-kernel@...r.kernel.org,
	randy.dunlap@...cle.com, wcohen@...hat.com, fweisbec@...il.com,
	tglx@...utronix.de, jbaron@...hat.com,
	linux-tip-commits@...r.kernel.org, Christoph Hellwig <hch@....de>
Subject: Re: trace/events: DECLARE vs DEFINE semantic

* H. Peter Anvin (hpa@...or.com) wrote:
> On 12/02/2009 02:57 PM, Mathieu Desnoyers wrote:
> >>
> >> TRACE_CLASS - Declares a class
> >> TRACE_CLASS_EVENT - defines an event for said class
> >> TRACE_EVENT - Declares a class and defines an event (as is today)
> > 
> > Yep, it looks good! It's self-descriptive and don't require to explain
> > what the thing is doing each time we refer to it. (however I feel a bit
> > sad for Fred, Wilma and Barney) ;)
> > 
> 
> Although you have to admit it's a bit confusing that:
> 
> TRACE_EVENT = TRACE_CLASS + TRACE_CLASS_EVENT
> 
> ... as opposed to ...
> 
> TRACE_CLASS_EVENT = TRACE_CLASS + TRACE_EVENT
> 
> 	-hpa

Then I would say that TRACE_EVENT should probably not have the
side-effect of declaring a globally-reuseable class. Maybe under the
hood it could create a privately-named class, but I don't see how it can
be re-used by following TRACE_CLASS_EVENT without causing confusion.

I'd go for:

TRACE_CLASS - Declares/defines a class
TRACE_CLASS_EVENT - Declares/defines an event for said class
TRACE_EVENT - Declares/defines a private class and declares/defines an event

Mathieu



> 
> -- 
> H. Peter Anvin, Intel Open Source Technology Center
> I work for Intel.  I don't speak on their behalf.
> 

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
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