From: Steven Rostedt <rostedt@goodmis.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Frederic Weisbecker <fweisbec@gmail.com>,
Mathieu Desnoyers <compudj@krystal.dyndns.org>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
Li Zefan <lizf@cn.fujitsu.com>, Christoph Hellwig <hch@lst.de>,
Wu Fengguang <fengguang.wu@intel.com>
Subject: Re: [PATCH 2/2][RFC] tracing: Add extract out softirq names used by irq trace events
Date: Sat, 13 Feb 2010 06:11:09 -0500 [thread overview]
Message-ID: <1266059470.24271.116.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1266057549.557.59605.camel@twins>
On Sat, 2010-02-13 at 11:39 +0100, Peter Zijlstra wrote:
> On Fri, 2010-02-12 at 14:09 -0500, Steven Rostedt wrote:
> > plain text document attachment (irq-events.patch)
> > The irq trace events that map the softirq vectors to strings
> > shows up in the format files as names. To allow binary parsers to
> > be able to convert these names to their actual numbers, this patch
> > extracts those enums.
> >
> > Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> >
> > ---
> > include/trace/events/irq.h | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > Index: linux-trace.git/include/trace/events/irq.h
> > ===================================================================
> > --- linux-trace.git.orig/include/trace/events/irq.h 2010-02-12 13:29:44.000000000 -0500
> > +++ linux-trace.git/include/trace/events/irq.h 2010-02-12 13:33:20.000000000 -0500
> > @@ -7,6 +7,17 @@
> > #include <linux/tracepoint.h>
> > #include <linux/interrupt.h>
> >
> > +EXTRACT_TRACE_SYMBOL(HI_SOFTIRQ);
> > +EXTRACT_TRACE_SYMBOL(TIMER_SOFTIRQ);
> > +EXTRACT_TRACE_SYMBOL(NET_TX_SOFTIRQ);
> > +EXTRACT_TRACE_SYMBOL(NET_RX_SOFTIRQ);
> > +EXTRACT_TRACE_SYMBOL(BLOCK_SOFTIRQ);
> > +EXTRACT_TRACE_SYMBOL(BLOCK_IOPOLL_SOFTIRQ);
> > +EXTRACT_TRACE_SYMBOL(TASKLET_SOFTIRQ);
> > +EXTRACT_TRACE_SYMBOL(SCHED_SOFTIRQ);
> > +EXTRACT_TRACE_SYMBOL(HRTIMER_SOFTIRQ);
> > +EXTRACT_TRACE_SYMBOL(RCU_SOFTIRQ);
> > +
>
> Still sucks you have to explicitly iterate them all, and far away from
> the actual definition site too, its just asking to get out of whack with
> reality.
We don't care about adding them near the definition site. We care about
what is used. In this same file we have:
#define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq }
#define show_softirq_name(val) \
__print_symbolic(val, \
softirq_name(HI), \
softirq_name(TIMER), \
softirq_name(NET_TX), \
softirq_name(NET_RX), \
softirq_name(BLOCK), \
softirq_name(BLOCK_IOPOLL), \
softirq_name(TASKLET), \
softirq_name(SCHED), \
softirq_name(HRTIMER), \
softirq_name(RCU))
Which uses the variables. If another softirq name is added, the
TRACE_EVENT already misses it. That's not the point of the EXTRACT
macro. The point is, if a TRACE_EVENT uses a name that is not a macro,
this gives a way for it to display that value.
-- Steve
next prev parent reply other threads:[~2010-02-13 11:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-12 19:09 [PATCH 0/2][RFC] tracing: Showing symbols for TRACE_EVENT Steven Rostedt
2010-02-12 19:09 ` [PATCH 1/2][RFC] tracing: Add EXTRACT_TRACE_SYMBOL() macro Steven Rostedt
2010-02-12 19:09 ` [PATCH 2/2][RFC] tracing: Add extract out softirq names used by irq trace events Steven Rostedt
2010-02-13 10:39 ` Peter Zijlstra
2010-02-13 11:11 ` Steven Rostedt [this message]
2010-02-25 23:48 ` Frederic Weisbecker
2010-02-26 2:26 ` Steven Rostedt
2010-02-27 10:39 ` Frederic Weisbecker
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=1266059470.24271.116.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=compudj@krystal.dyndns.org \
--cc=fengguang.wu@intel.com \
--cc=fweisbec@gmail.com \
--cc=hch@lst.de \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--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®