1 #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ)
4 #include <linux/tracepoint.h>
5 #include <linux/interrupt.h>
8 #define TRACE_SYSTEM irq
11 * irq_handler_entry - called immediately before the irq action handler
13 * @action: pointer to struct irqaction
15 * The struct irqaction pointed to by @action contains various
16 * information about the handler, including the device name,
17 * @action->name, and the device id, @action->dev_id. When used in
18 * conjunction with the irq_handler_exit tracepoint, we can figure
19 * out irq handler latencies.
21 TRACE_EVENT(irq_handler_entry,
23 TP_PROTO(int irq, struct irqaction *action),
29 __string( name, action->name )
34 __assign_str(name, action->name);
37 TP_printk("irq=%d handler=%s", __entry->irq, __get_str(name))
41 * irq_handler_exit - called immediately after the irq action handler returns
43 * @action: pointer to struct irqaction
46 * If the @ret value is set to IRQ_HANDLED, then we know that the corresponding
47 * @action->handler scuccessully handled this irq. Otherwise, the irq might be
48 * a shared irq line, or the irq was not handled successfully. Can be used in
49 * conjunction with the irq_handler_entry to understand irq handler latencies.
51 TRACE_EVENT(irq_handler_exit,
53 TP_PROTO(int irq, struct irqaction *action, int ret),
55 TP_ARGS(irq, action, ret),
67 TP_printk("irq=%d return=%s",
68 __entry->irq, __entry->ret ? "handled" : "unhandled")
72 * softirq_entry - called immediately before the softirq handler
73 * @h: pointer to struct softirq_action
74 * @vec: pointer to first struct softirq_action in softirq_vec array
76 * The @h parameter, contains a pointer to the struct softirq_action
77 * which has a pointer to the action handler that is called. By subtracting
78 * the @vec pointer from the @h pointer, we can determine the softirq
79 * number. Also, when used in combination with the softirq_exit tracepoint
80 * we can determine the softirq latency.
82 TRACE_EVENT(softirq_entry,
84 TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
90 __string( name, softirq_to_name[h-vec] )
94 __entry->vec = (int)(h - vec);
95 __assign_str(name, softirq_to_name[h-vec]);
98 TP_printk("softirq=%d action=%s", __entry->vec, __get_str(name))
102 * softirq_exit - called immediately after the softirq handler returns
103 * @h: pointer to struct softirq_action
104 * @vec: pointer to first struct softirq_action in softirq_vec array
106 * The @h parameter contains a pointer to the struct softirq_action
107 * that has handled the softirq. By subtracting the @vec pointer from
108 * the @h pointer, we can determine the softirq number. Also, when used in
109 * combination with the softirq_entry tracepoint we can determine the softirq
112 TRACE_EVENT(softirq_exit,
114 TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
120 __string( name, softirq_to_name[h-vec] )
124 __entry->vec = (int)(h - vec);
125 __assign_str(name, softirq_to_name[h-vec]);
128 TP_printk("softirq=%d action=%s", __entry->vec, __get_str(name))
131 #endif /* _TRACE_IRQ_H */
133 /* This part must be outside protection */
134 #include <trace/define_trace.h>