Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
irq.h
Go to the documentation of this file.
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM irq
3 
4 #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_IRQ_H
6 
7 #include <linux/tracepoint.h>
8 
9 struct irqaction;
10 struct softirq_action;
11 
12 #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq }
13 #define show_softirq_name(val) \
14  __print_symbolic(val, \
15  softirq_name(HI), \
16  softirq_name(TIMER), \
17  softirq_name(NET_TX), \
18  softirq_name(NET_RX), \
19  softirq_name(BLOCK), \
20  softirq_name(BLOCK_IOPOLL), \
21  softirq_name(TASKLET), \
22  softirq_name(SCHED), \
23  softirq_name(HRTIMER), \
24  softirq_name(RCU))
25 
37 TRACE_EVENT(irq_handler_entry,
38 
39  TP_PROTO(int irq, struct irqaction *action),
40 
41  TP_ARGS(irq, action),
42 
44  __field( int, irq )
45  __string( name, action->name )
46  ),
47 
49  __entry->irq = irq;
50  __assign_str(name, action->name);
51  ),
52 
53  TP_printk("irq=%d name=%s", __entry->irq, __get_str(name))
54 );
55 
67 TRACE_EVENT(irq_handler_exit,
68 
69  TP_PROTO(int irq, struct irqaction *action, int ret),
70 
71  TP_ARGS(irq, action, ret),
72 
74  __field( int, irq )
75  __field( int, ret )
76  ),
77 
79  __entry->irq = irq;
80  __entry->ret = ret;
81  ),
82 
83  TP_printk("irq=%d ret=%s",
84  __entry->irq, __entry->ret ? "handled" : "unhandled")
85 );
86 
87 DECLARE_EVENT_CLASS(softirq,
88 
89  TP_PROTO(unsigned int vec_nr),
90 
91  TP_ARGS(vec_nr),
92 
94  __field( unsigned int, vec )
95  ),
96 
98  __entry->vec = vec_nr;
99  ),
100 
101  TP_printk("vec=%u [action=%s]", __entry->vec,
103 );
104 
112 DEFINE_EVENT(softirq, softirq_entry,
113 
114  TP_PROTO(unsigned int vec_nr),
115 
116  TP_ARGS(vec_nr)
117 );
118 
126 DEFINE_EVENT(softirq, softirq_exit,
127 
128  TP_PROTO(unsigned int vec_nr),
129 
130  TP_ARGS(vec_nr)
131 );
132 
140 DEFINE_EVENT(softirq, softirq_raise,
141 
142  TP_PROTO(unsigned int vec_nr),
143 
144  TP_ARGS(vec_nr)
145 );
146 
147 #endif /* _TRACE_IRQ_H */
148 
149 /* This part must be outside protection */
150 #include <trace/define_trace.h>