lkml.org 
[lkml]   [2009]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: trace/events: DECLARE vs DEFINE semantic
* Steven Rostedt (rostedt@goodmis.org) wrote:
> On Wed, 2009-12-02 at 17:36 -0500, Masami Hiramatsu wrote:
>
> > > Or do you (or anyone else) have a better name?
> >
> > How about renaming DEFINE_EVENT to TRACE_EVENT_CLASS?
> >
> > DECLARE_EVENT_CLASS(y, ...) declare an event-class y
> > TRACE_EVENT_CLASS(x, y, ...) define/declare a trace event x from event-class y
> > TRACE_EVENT(x, ...) define/declare a trace event x
> >
> > Thus TRACE_EVENT_* implies that this macro will be expanded
> > to both of definition and declaration.
> > I don't think separating it is good idea from the viewpoint
> > of maintaining code.
>
> Hmm, what about just:
>
> 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) ;)

For that semantic, you have my

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>

Thanks,

Mathieu

>
> -- Steve
>
>

--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68


\
 
 \ /
  Last update: 2009-12-03 00:05    [W:1.865 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site