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: <1259262740.21397.121.camel@gandalf.stny.rr.com>
Date:	Thu, 26 Nov 2009 14:12:20 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Frederic Weisbecker <fweisbec@...il.com>, mingo@...hat.com,
	hpa@...or.com, linux-kernel@...r.kernel.org,
	penberg@...helsinki.fi, tglx@...utronix.de,
	linux-tip-commits@...r.kernel.org, Christoph Hellwig <hch@....de>
Subject: Re: [tip:perf/core] events: Rename TRACE_EVENT_TEMPLATE() to
 DECLARE_EVENT_CLASS()

(added Christoph since he was the one to recommend the template
creation)

On Thu, 2009-11-26 at 19:12 +0100, Ingo Molnar wrote:
> * Frederic Weisbecker <fweisbec@...il.com> wrote:

> DECLARE_EVENT_CLASS() doesnt really define an event visible to the user 
> yet though. It defines functions internally (to be used by the real 
> definition of the event) - but not visible externally really.
> 
> So the real 'definition' of an event happens with DEFINE_EVENT() - in 
> the logical model of this.
> 
> So the logical model is clear:
> 
>    DECLARE_EVENT_CLASS(class);
> 
>     DEFINE_EVENT(class, event1);
>     DEFINE_EVENT(class, event2);
>     DEFINE_EVENT(class, event3);
>     ...
> 
>   # later:
>   # DEFINE_STANDALONE_EVENT(event)

I think that name sounds even uglier than DEFINE_SINGLE_EVENT :-/

I'm fine with the DECLARE_EVENT_CLASS and DEFINE_EVENT, but I'm unsure
what to rename TRACE_EVENT as. I know its still pretty new, but it's
being used quite a bit. So it should take some extra thought.

I guess DEFINE_EVENT_CLASS is probably not good, although this would be
the combination of DECLARE_EVENT_CLASS and DEFINE_EVENT which it
actually is.

DECLARE_DEFINE_EVENT?  *naw*

DEFINE_DECLARED_EVENT?

Or we could go with DECLARE_EVENT(), DECLARE_EVENT_CLASS() and
DEFINE_EVENT_CLASS_INSTANCE()?


> 
> And the logical model is what matters: that's what developers will use. 
> They'll use these constructs based on the logical model, nobody sane 
> will look into the CPP magic ;-)
> 
> And yes, we occasionally have to revisit our naming choices - especially 
> when mistakes/misnomers become apparent.

Agreed, but lets discuss it before we commit it to a non-rebase branch.

-- Steve


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