lkml.org 
[lkml]   [2009]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip:perf/core] tracing: Add DEFINE_EVENT(), DEFINE_SINGLE_EVENT() support to docbook
On Wed, 02 Dec 2009 09:55:35 -0500 Steven Rostedt wrote:

> On Wed, 2009-12-02 at 15:43 +0100, Ingo Molnar wrote:
> > * Steven Rostedt <rostedt@goodmis.org> wrote:
> >
> > > On Wed, 2009-12-02 at 15:01 +0100, Ingo Molnar wrote:
> > >
> > > > > DECLARE_CLASS_AND_DEFINE_EVENT()
> > > >
> > > > Hm, that's a bit too long. How about 'DEFINE_CLASS_EVENT()' as a
> > > > compromise? It's similarly short-ish to TRACE_EVENT(), and it also
> > > > conveys the fact that we create both a class and an event there.
> > > >
> > > > The full series would thus be:
> > > >
> > > > DECLARE_EVENT_CLASS
> > > > DEFINE_EVENT
> > > > DEFINE_CLASS_EVENT
> > > >
> > > > hm?
> > >
> > > I thought about that too, but it actually makes it more confusing.
> > > Because, looking at this with a fresh POV, I would think that after I
> > > declare a class, I would use DEFINE_CLASS_EVENT with that class.
> >
> > yeah. Hence was my second-best choice 'DEFINE_STANDALONE_EVENT' or
> > 'DEFINE_SINGLE_EVENT' - to stress the special nature it, and to actually
> > nudge people towards creating classes of events instead of doing
> > separate, standalone points. (which are a waste in the majority of
> > cases)
>
> But the current TRACE_EVENT is still defining a class. Thus, you could
> create a TRACE_EVENT (or whatever it is called) and then create
> DEFINE_EVENTs based on the TRACE_EVENT.
>
> That's why I want a name that describes this.
>
> DEFINE_EVENT_CLASS?
>
> Perhaps that's the best.
>
> DECLARE_EVENT_CLASS - only creates a class
> DEFINE_EVENT - defines an event based off of a class
> DEFINE_EVENT_CLASS - creates a class and defines an event by the same name
>
> Perhaps this is best in keeping with linux kernel naming conventions?

Yes, that seems fairly typical.

I didn't care for the
DEFINE_x_y()
and
DEFINE_y_x()
suggestion. That just opens the door for confusion IMO.

thanks,
---
~Randy


\
 
 \ /
  Last update: 2009-12-02 17:19    [W:0.068 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site