From: Steven Rostedt <rostedt@goodmis.org>
To: Amit Kucheria <amit.kucheria@linaro.org>
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
linux-kernel@vger.kernel.org, linux-hotplug@vger.kernel.org,
fweisbec@gmail.com
Subject: Re: [PATCH] tracing, perf : add cpu hotplug trace events
Date: Fri, 07 Jan 2011 10:52:08 -0500 [thread overview]
Message-ID: <1294415528.26623.226.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <AANLkTik0i5xeNG_+tgdfWRjC1cQAbm+-0fDNGih5KfRx@mail.gmail.com>
On Fri, 2011-01-07 at 14:51 +0530, Amit Kucheria wrote:
> > +
> > +TRACE_EVENT(hotplug_start,
> > +
> > + TP_PROTO(unsigned int type, unsigned int step, unsigned int cpuid),
> > +
> > + TP_ARGS(type, step, cpuid),
> > +
> > + TP_STRUCT__entry(
> > + __field(u32, type)
> > + __field(u32, step)
> > + __field(u32, cpuid)
> > + ),
> > +
> > + TP_fast_assign(
> > + __entry->type = type;
> > + __entry->step = step;
> > + __entry->cpuid = cpuid;
> > + ),
> > +
> > + TP_printk("type=%lu step=%lu cpuid=%lu", (unsigned long)__entry->type,
> > + (unsigned long)__entry->step, (unsigned long)__entry->cpuid)
> > +);
> > +
> > +TRACE_EVENT(hotplug_end,
> > +
> > + TP_PROTO(unsigned int type, unsigned int step, unsigned int cpuid),
> > +
> > + TP_ARGS(type, step, cpuid),
> > +
> > + TP_STRUCT__entry(
> > + __field(u32, type)
> > + __field(u32, step)
> > + __field(u32, cpuid)
> > + ),
> > +
> > + TP_fast_assign(
> > + __entry->type = type;
> > + __entry->step = step;
> > + __entry->cpuid = cpuid;
> > + ),
> > +
> > + TP_printk("type=%lu step=%lu cpuid=%lu", (unsigned long)__entry->type,
> > + (unsigned long)__entry->step, (unsigned long)__entry->cpuid)
> > +);
> > +
> >
Please use classes when having tracepoints that have the same fields.
This will save a bit of kernel memory. Something like:
DECLARE_EVENT_CLASS(hotplug_template,
TP_PROTO(unsigned int type, unsigned int step, unsigned int cpuid),
TP_ARGS(type, step, cpuid),
TP_STRUCT__entry(
__field(u32, type)
__field(u32, step)
__field(u32, cpuid)
),
TP_fast_assign(
__entry->type = type;
__entry->step = step;
__entry->cpuid = cpuid;
),
TP_printk("type=%lu step=%lu cpuid=%lu", (unsigned long)__entry->type,
(unsigned long)__entry->step, (unsigned long)__entry->cpuid)
);
DEFINE_EVENT(hotplug_template, hotplug_start,
TP_PROTO(unsigned int type, unsigned int step, unsigned int cpuid),
TP_ARGS(type, step, cpuid);
DEFINE_EVENT(hotplug_template, hotplug_end,
TP_PROTO(unsigned int type, unsigned int step, unsigned int cpuid),
TP_ARGS(type, step, cpuid);
-- Steve
next prev parent reply other threads:[~2011-01-07 15:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-04 9:50 Vincent Guittot
2011-01-07 9:21 ` Amit Kucheria
2011-01-07 12:07 ` Vincent Guittot
2011-01-07 15:52 ` Steven Rostedt [this message]
2011-01-07 15:12 ` Frederic Weisbecker
2011-01-07 18:25 ` Vincent Guittot
2011-01-14 18:35 ` Frederic Weisbecker
2011-01-17 13:49 ` Vincent Guittot
2011-01-17 16:21 ` Frederic Weisbecker
2011-01-17 17:33 ` Vincent Guittot
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=1294415528.26623.226.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=amit.kucheria@linaro.org \
--cc=fweisbec@gmail.com \
--cc=linux-hotplug@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vincent.guittot@linaro.org \
/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®