mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
	penberg@cs.helsinki.fi, tglx@linutronix.de,
	linux-tip-commits@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [tip:perf/core] events: Rename TRACE_EVENT_TEMPLATE() to DECLARE_EVENT_CLASS()
Date: Thu, 26 Nov 2009 22:52:54 -0500	[thread overview]
Message-ID: <1259293974.21397.138.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20091126231329.GA8581@nowhere>

On Fri, 2009-11-27 at 00:13 +0100, Frederic Weisbecker wrote:

> > 
> > But I do agree with Frederic that this can be a little confusing, since
> > it makes it sound like DEFINE_EVENT is for multiple events.
> > 
> > What about saying exactly what it does?
> > 
> > DECLARE_AND_DEFINE_EVENT()
> 
> 
> It tells so much that it is confusing :)

Information overload huh? ;-)

> 
>  
> > 
> > Come to think of it, since current TRACE_EVENT is now just:
> > 
> > #define TRACE_EVENT() \
> > 	TRACE_EVENT_TEMPLATE() \
> > 	DEFINE_EVENT
> > 
> > This may make the most sense. I haven't tried it, but I believe that you
> > could even base other events off of the TRACE_EVENT. That is:
> > 
> > TRACE_EVENT(x, ...);
> > 
> > DEFINE_EVENT(x, y, ...);
> > 
> > And y would use x as its class.
> > 
> > So going back to your scheme of DECLARE_EVENT_CLASS(), it may make sense
> > to have DECLARE_AND_DEFINE_EVENT().
> > 
> > 
> > DECLARE_EVENT_CLASS(class, ...);
> > DEFINE_EVENT(class, foo, ...);
> > 
> > DECLARE_AND_DEFINE_EVENT(bar, ...);
> 
> 
> 
> Yep, or DEFINE_EVENT_NOCLASS.

Well it may not be upper class, but I wouldn't say it has no class ;-)

But seriously, that is more misleading. It is a class. Remember, that
TRACE_EVENT is both a class and a define. With the new names for
template trace_event is:

#define TRACE_EVENT(name, ...) \
	DECLARE_EVENT_CLASS(name, ...); \
	DEFINE_EVENT(name, name, ...);

So TRACE_EVENT really is a DECLARE_CLASS_AND_DEFINE_EVENT(name, ...);

-- Steve

> 
> 
> 
> > DEFINE_EVENT(bar, zoo, ...);
> > 
> > 
> > May work.
> > 
> > -- Steve
> > 
> > 
> 


  reply	other threads:[~2009-11-27  3:52 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-26  7:02 [PATCH 0/9] tracing: Convert some trace events to DEFINE_TRACE Li Zefan
2009-11-26  7:03 ` [PATCH 1/9] tracing: Convert module refcnt events to DEFINE_EVENT Li Zefan
2009-11-26  8:42   ` [tip:perf/core] " tip-bot for Li Zefan
2009-11-26  7:04 ` [PATCH 2/9] tracing: Convert some kmem " Li Zefan
2009-11-26  7:24   ` Pekka Enberg
2009-11-26  7:38     ` Steven Rostedt
2009-11-26  7:57     ` Ingo Molnar
2009-11-26  8:29       ` Steven Rostedt
2009-11-26  8:16   ` [tip:perf/core] events: Rename TRACE_EVENT_TEMPLATE() to DECLARE_EVENT_CLASS() tip-bot for Ingo Molnar
2009-11-26  8:33     ` Steven Rostedt
2009-11-26  8:40       ` Ingo Molnar
2009-11-26 14:45         ` Steven Rostedt
2009-11-26 17:55           ` Frederic Weisbecker
2009-11-26 18:12             ` Ingo Molnar
2009-11-26 19:12               ` Steven Rostedt
2009-11-26 19:20                 ` Ingo Molnar
2009-11-26 19:44                   ` Steven Rostedt
2009-11-26 19:47                     ` Steven Rostedt
2009-11-26 23:13                     ` Frederic Weisbecker
2009-11-27  3:52                       ` Steven Rostedt [this message]
2009-11-26  8:42   ` [tip:perf/core] tracing: Convert some kmem events to DEFINE_EVENT tip-bot for Li Zefan
2009-11-26 12:34   ` [tip:perf/core] tracing: Fix kmem event exports tip-bot for Ingo Molnar
2009-11-26  7:04 ` [PATCH 3/9] tracing: Convert softirq events to DEFINE_EVENT Li Zefan
2009-11-26  8:43   ` [tip:perf/core] " tip-bot for Li Zefan
2009-11-26  7:05 ` [PATCH 4/9] tracing: Convert some workqueue " Li Zefan
2009-11-26  8:43   ` [tip:perf/core] " tip-bot for Li Zefan
2009-11-26  7:05 ` [PATCH 5/9] tracing: Convert some power " Li Zefan
2009-11-26  8:43   ` [tip:perf/core] " tip-bot for Li Zefan
2009-11-26  7:06 ` [PATCH 6/9] tracing: Convert some block " Li Zefan
2009-11-26  8:36   ` Jens Axboe
2009-11-26  8:44     ` Ingo Molnar
2009-11-26  8:47       ` Jens Axboe
2009-11-26  8:50         ` Ingo Molnar
2009-11-26  8:52           ` Jens Axboe
2009-11-26  8:43   ` [tip:perf/core] " tip-bot for Li Zefan
2009-11-26  7:06 ` [PATCH 7/9] tracing: Convert some jbd2 " Li Zefan
2009-11-26  8:44   ` [tip:perf/core] " tip-bot for Li Zefan
2009-11-26  7:07 ` [PATCH 8/9] tracing: Convert some ext4 events to DEFINE_TRACE Li Zefan
2009-11-26  8:44   ` [tip:perf/core] " tip-bot for Li Zefan
2009-11-26  7:08 ` [PATCH 9/9] tracing: Restore original format of sched events Li Zefan
2009-11-26  8:44   ` [tip:perf/core] " tip-bot for Li Zefan
2009-11-26  7:32 ` [PATCH 0/9] tracing: Convert some trace events to DEFINE_TRACE Steven Rostedt
2009-11-26  7:59   ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1259293974.21397.138.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=fweisbec@gmail.com \
    --cc=hch@lst.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=penberg@cs.helsinki.fi \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®