Commit f0a91b3c authored by Steven Rostedt (Red Hat)'s avatar Steven Rostedt (Red Hat) Committed by Steven Rostedt

irq/tracing: Export enums in tracepoints to user space

The enums used by the softirq mapping is what is shown in the output
of the __print_symbolic() and not their values, that are needed
to map them to their strings. Export them to userspace with the
TRACE_DEFINE_ENUM() macro so that user space tools can map the enums
with their values.

Link: http://lkml.kernel.org/r/20150403013802.220157513@goodmis.org

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Reviewed-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tested-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 5511b9a4
...@@ -9,19 +9,34 @@ ...@@ -9,19 +9,34 @@
struct irqaction; struct irqaction;
struct softirq_action; struct softirq_action;
#define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } #define SOFTIRQ_NAME_LIST \
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_end(RCU)
#undef softirq_name
#undef softirq_name_end
#define softirq_name(sirq) TRACE_DEFINE_ENUM(sirq##_SOFTIRQ);
#define softirq_name_end(sirq) TRACE_DEFINE_ENUM(sirq##_SOFTIRQ);
SOFTIRQ_NAME_LIST
#undef softirq_name
#undef softirq_name_end
#define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq },
#define softirq_name_end(sirq) { sirq##_SOFTIRQ, #sirq }
#define show_softirq_name(val) \ #define show_softirq_name(val) \
__print_symbolic(val, \ __print_symbolic(val, SOFTIRQ_NAME_LIST)
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))
/** /**
* irq_handler_entry - called immediately before the irq action handler * irq_handler_entry - called immediately before the irq action handler
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment