2 #define TRACE_SYSTEM irq
4 #if !defined(LTTNG_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_IRQ_H
7 #include "../../../probes/lttng-tracepoint-event.h"
9 #ifndef _TRACE_IRQ_DEF_
10 #define _TRACE_IRQ_DEF_
13 struct softirq_action
;
15 #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq }
16 #define show_softirq_name(val) \
17 __print_symbolic(val, \
19 softirq_name(TIMER), \
20 softirq_name(NET_TX), \
21 softirq_name(NET_RX), \
22 softirq_name(BLOCK), \
23 softirq_name(BLOCK_IOPOLL), \
24 softirq_name(TASKLET), \
25 softirq_name(SCHED), \
26 softirq_name(HRTIMER), \
29 #endif /* _TRACE_IRQ_DEF_ */
32 * irq_handler_entry - called immediately before the irq action handler
34 * @action: pointer to struct irqaction
36 * The struct irqaction pointed to by @action contains various
37 * information about the handler, including the device name,
38 * @action->name, and the device id, @action->dev_id. When used in
39 * conjunction with the irq_handler_exit tracepoint, we can figure
40 * out irq handler latencies.
42 LTTNG_TRACEPOINT_EVENT(irq_handler_entry
,
44 TP_PROTO(int irq
, struct irqaction
*action
),
50 __string( name
, action
->name
)
55 tp_strcpy(name
, action
->name
)
58 TP_printk("irq=%d name=%s", __entry
->irq
, __get_str(name
))
62 * irq_handler_exit - called immediately after the irq action handler returns
64 * @action: pointer to struct irqaction
67 * If the @ret value is set to IRQ_HANDLED, then we know that the corresponding
68 * @action->handler scuccessully handled this irq. Otherwise, the irq might be
69 * a shared irq line, or the irq was not handled successfully. Can be used in
70 * conjunction with the irq_handler_entry to understand irq handler latencies.
72 LTTNG_TRACEPOINT_EVENT(irq_handler_exit
,
74 TP_PROTO(int irq
, struct irqaction
*action
, int ret
),
76 TP_ARGS(irq
, action
, ret
),
88 TP_printk("irq=%d ret=%s",
89 __entry
->irq
, __entry
->ret
? "handled" : "unhandled")
92 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
93 LTTNG_TRACEPOINT_EVENT_CLASS(irq_softirq
,
95 TP_PROTO(unsigned int vec_nr
),
100 __field( unsigned int, vec
)
104 tp_assign(vec
, vec_nr
)
107 TP_printk("vec=%u [action=%s]", __entry
->vec
,
108 show_softirq_name(__entry
->vec
))
112 * softirq_entry - called immediately before the softirq handler
113 * @vec_nr: softirq vector number
115 * When used in combination with the softirq_exit tracepoint
116 * we can determine the softirq handler runtine.
118 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq
, softirq_entry
,
122 TP_PROTO(unsigned int vec_nr
),
128 * softirq_exit - called immediately after the softirq handler returns
129 * @vec_nr: softirq vector number
131 * When used in combination with the softirq_entry tracepoint
132 * we can determine the softirq handler runtine.
134 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq
, softirq_exit
,
138 TP_PROTO(unsigned int vec_nr
),
144 * softirq_raise - called immediately when a softirq is raised
145 * @vec_nr: softirq vector number
147 * When used in combination with the softirq_entry tracepoint
148 * we can determine the softirq raise to run latency.
150 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq
, softirq_raise
,
154 TP_PROTO(unsigned int vec_nr
),
158 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
159 LTTNG_TRACEPOINT_EVENT_CLASS(irq_softirq
,
161 TP_PROTO(struct softirq_action
*h
, struct softirq_action
*vec
),
166 __field( unsigned int, vec
)
170 tp_assign(vec
, (int)(h
- vec
))
173 TP_printk("vec=%u [action=%s]", __entry
->vec
,
174 show_softirq_name(__entry
->vec
))
178 * softirq_entry - called immediately before the softirq handler
179 * @h: pointer to struct softirq_action
180 * @vec: pointer to first struct softirq_action in softirq_vec array
182 * When used in combination with the softirq_exit tracepoint
183 * we can determine the softirq handler runtine.
185 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq
, softirq_entry
,
189 TP_PROTO(struct softirq_action
*h
, struct softirq_action
*vec
),
195 * softirq_exit - called immediately after the softirq handler returns
196 * @h: pointer to struct softirq_action
197 * @vec: pointer to first struct softirq_action in softirq_vec array
199 * When used in combination with the softirq_entry tracepoint
200 * we can determine the softirq handler runtine.
202 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq
, softirq_exit
,
206 TP_PROTO(struct softirq_action
*h
, struct softirq_action
*vec
),
212 * softirq_raise - called immediately when a softirq is raised
213 * @h: pointer to struct softirq_action
214 * @vec: pointer to first struct softirq_action in softirq_vec array
216 * When used in combination with the softirq_entry tracepoint
217 * we can determine the softirq raise to run latency.
219 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq
, softirq_raise
,
223 TP_PROTO(struct softirq_action
*h
, struct softirq_action
*vec
),
227 #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
229 #endif /* LTTNG_TRACE_IRQ_H */
231 /* This part must be outside protection */
232 #include "../../../probes/define_trace.h"
This page took 0.033739 seconds and 4 git commands to generate.