lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 13 Feb 2010 06:11:09 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Mathieu Desnoyers <compudj@...stal.dyndns.org>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Li Zefan <lizf@...fujitsu.com>, Christoph Hellwig <hch@....de>,
	Wu Fengguang <fengguang.wu@...el.com>
Subject: Re: [PATCH 2/2][RFC] tracing: Add extract out softirq names used
 by irq trace events

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@...dmis.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



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ