rcu: move TREE_RCU from softirq to kthread
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / trace / events / irq.h
blobae045ca7d356033d49c8a9650a618c206503f68c
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM irq
4 #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_IRQ_H
7 #include <linux/tracepoint.h>
9 struct irqaction;
10 struct softirq_action;
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))
25 /**
26 * irq_handler_entry - called immediately before the irq action handler
27 * @irq: irq number
28 * @action: pointer to struct irqaction
30 * The struct irqaction pointed to by @action contains various
31 * information about the handler, including the device name,
32 * @action->name, and the device id, @action->dev_id. When used in
33 * conjunction with the irq_handler_exit tracepoint, we can figure
34 * out irq handler latencies.
36 TRACE_EVENT(irq_handler_entry,
38 TP_PROTO(int irq, struct irqaction *action),
40 TP_ARGS(irq, action),
42 TP_STRUCT__entry(
43 __field( int, irq )
44 __string( name, action->name )
47 TP_fast_assign(
48 __entry->irq = irq;
49 __assign_str(name, action->name);
52 TP_printk("irq=%d name=%s", __entry->irq, __get_str(name))
55 /**
56 * irq_handler_exit - called immediately after the irq action handler returns
57 * @irq: irq number
58 * @action: pointer to struct irqaction
59 * @ret: return value
61 * If the @ret value is set to IRQ_HANDLED, then we know that the corresponding
62 * @action->handler scuccessully handled this irq. Otherwise, the irq might be
63 * a shared irq line, or the irq was not handled successfully. Can be used in
64 * conjunction with the irq_handler_entry to understand irq handler latencies.
66 TRACE_EVENT(irq_handler_exit,
68 TP_PROTO(int irq, struct irqaction *action, int ret),
70 TP_ARGS(irq, action, ret),
72 TP_STRUCT__entry(
73 __field( int, irq )
74 __field( int, ret )
77 TP_fast_assign(
78 __entry->irq = irq;
79 __entry->ret = ret;
82 TP_printk("irq=%d ret=%s",
83 __entry->irq, __entry->ret ? "handled" : "unhandled")
86 DECLARE_EVENT_CLASS(softirq,
88 TP_PROTO(unsigned int vec_nr),
90 TP_ARGS(vec_nr),
92 TP_STRUCT__entry(
93 __field( unsigned int, vec )
96 TP_fast_assign(
97 __entry->vec = vec_nr;
100 TP_printk("vec=%u [action=%s]", __entry->vec,
101 show_softirq_name(__entry->vec))
105 * softirq_entry - called immediately before the softirq handler
106 * @vec_nr: softirq vector number
108 * When used in combination with the softirq_exit tracepoint
109 * we can determine the softirq handler runtine.
111 DEFINE_EVENT(softirq, softirq_entry,
113 TP_PROTO(unsigned int vec_nr),
115 TP_ARGS(vec_nr)
119 * softirq_exit - called immediately after the softirq handler returns
120 * @vec_nr: softirq vector number
122 * When used in combination with the softirq_entry tracepoint
123 * we can determine the softirq handler runtine.
125 DEFINE_EVENT(softirq, softirq_exit,
127 TP_PROTO(unsigned int vec_nr),
129 TP_ARGS(vec_nr)
133 * softirq_raise - called immediately when a softirq is raised
134 * @vec_nr: softirq vector number
136 * When used in combination with the softirq_entry tracepoint
137 * we can determine the softirq raise to run latency.
139 DEFINE_EVENT(softirq, softirq_raise,
141 TP_PROTO(unsigned int vec_nr),
143 TP_ARGS(vec_nr)
146 #endif /* _TRACE_IRQ_H */
148 /* This part must be outside protection */
149 #include <trace/define_trace.h>