aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/irq.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/events/irq.h')
-rw-r--r--include/trace/events/irq.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h
index 32a9f7ef432b..683fb36a9943 100644
--- a/include/trace/events/irq.h
+++ b/include/trace/events/irq.h
@@ -7,6 +7,19 @@
7#undef TRACE_SYSTEM 7#undef TRACE_SYSTEM
8#define TRACE_SYSTEM irq 8#define TRACE_SYSTEM irq
9 9
10#define softirq_name(sirq) { sirq, #sirq }
11#define show_softirq_name(val) \
12 __print_symbolic(val, \
13 softirq_name(HI_SOFTIRQ), \
14 softirq_name(TIMER_SOFTIRQ), \
15 softirq_name(NET_TX_SOFTIRQ), \
16 softirq_name(NET_RX_SOFTIRQ), \
17 softirq_name(BLOCK_SOFTIRQ), \
18 softirq_name(TASKLET_SOFTIRQ), \
19 softirq_name(SCHED_SOFTIRQ), \
20 softirq_name(HRTIMER_SOFTIRQ), \
21 softirq_name(RCU_SOFTIRQ))
22
10/** 23/**
11 * irq_handler_entry - called immediately before the irq action handler 24 * irq_handler_entry - called immediately before the irq action handler
12 * @irq: irq number 25 * @irq: irq number
@@ -87,15 +100,14 @@ TRACE_EVENT(softirq_entry,
87 100
88 TP_STRUCT__entry( 101 TP_STRUCT__entry(
89 __field( int, vec ) 102 __field( int, vec )
90 __string( name, softirq_to_name[h-vec] )
91 ), 103 ),
92 104
93 TP_fast_assign( 105 TP_fast_assign(
94 __entry->vec = (int)(h - vec); 106 __entry->vec = (int)(h - vec);
95 __assign_str(name, softirq_to_name[h-vec]);
96 ), 107 ),
97 108
98 TP_printk("softirq=%d action=%s", __entry->vec, __get_str(name)) 109 TP_printk("softirq=%d action=%s", __entry->vec,
110 show_softirq_name(__entry->vec))
99); 111);
100 112
101/** 113/**
@@ -117,15 +129,14 @@ TRACE_EVENT(softirq_exit,
117 129
118 TP_STRUCT__entry( 130 TP_STRUCT__entry(
119 __field( int, vec ) 131 __field( int, vec )
120 __string( name, softirq_to_name[h-vec] )
121 ), 132 ),
122 133
123 TP_fast_assign( 134 TP_fast_assign(
124 __entry->vec = (int)(h - vec); 135 __entry->vec = (int)(h - vec);
125 __assign_str(name, softirq_to_name[h-vec]);
126 ), 136 ),
127 137
128 TP_printk("softirq=%d action=%s", __entry->vec, __get_str(name)) 138 TP_printk("softirq=%d action=%s", __entry->vec,
139 show_softirq_name(__entry->vec))
129); 140);
130 141
131#endif /* _TRACE_IRQ_H */ 142#endif /* _TRACE_IRQ_H */