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 #endif /* _TRACE_IRQ_DEF_ */
18 * irq_handler_entry - called immediately before the irq action handler
20 * @action: pointer to struct irqaction
22 * The struct irqaction pointed to by @action contains various
23 * information about the handler, including the device name,
24 * @action->name, and the device id, @action->dev_id. When used in
25 * conjunction with the irq_handler_exit tracepoint, we can figure
26 * out irq handler latencies.
28 LTTNG_TRACEPOINT_EVENT(irq_handler_entry
,
30 TP_PROTO(int irq
, struct irqaction
*action
),
36 __string( name
, action
->name
)
41 tp_strcpy(name
, action
->name
)
44 TP_printk("irq=%d name=%s", __entry
->irq
, __get_str(name
))
48 * irq_handler_exit - called immediately after the irq action handler returns
50 * @action: pointer to struct irqaction
53 * If the @ret value is set to IRQ_HANDLED, then we know that the corresponding
54 * @action->handler scuccessully handled this irq. Otherwise, the irq might be
55 * a shared irq line, or the irq was not handled successfully. Can be used in
56 * conjunction with the irq_handler_entry to understand irq handler latencies.
58 LTTNG_TRACEPOINT_EVENT(irq_handler_exit
,
60 TP_PROTO(int irq
, struct irqaction
*action
, int ret
),
62 TP_ARGS(irq
, action
, ret
),
74 TP_printk("irq=%d ret=%s",
75 __entry
->irq
, __entry
->ret
? "handled" : "unhandled")
78 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
79 LTTNG_TRACEPOINT_EVENT_CLASS(softirq
,
81 TP_PROTO(unsigned int vec_nr
),
86 __field( unsigned int, vec
)
90 tp_assign(vec
, vec_nr
)
97 * softirq_entry - called immediately before the softirq handler
98 * @vec_nr: softirq vector number
100 * When used in combination with the softirq_exit tracepoint
101 * we can determine the softirq handler runtine.
103 LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq
, softirq_entry
,
105 TP_PROTO(unsigned int vec_nr
),
111 * softirq_exit - called immediately after the softirq handler returns
112 * @vec_nr: softirq vector number
114 * When used in combination with the softirq_entry tracepoint
115 * we can determine the softirq handler runtine.
117 LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq
, softirq_exit
,
119 TP_PROTO(unsigned int vec_nr
),
125 * softirq_raise - called immediately when a softirq is raised
126 * @vec_nr: softirq vector number
128 * When used in combination with the softirq_entry tracepoint
129 * we can determine the softirq raise to run latency.
131 LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq
, softirq_raise
,
133 TP_PROTO(unsigned int vec_nr
),
137 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
138 LTTNG_TRACEPOINT_EVENT_CLASS(softirq
,
140 TP_PROTO(struct softirq_action
*h
, struct softirq_action
*vec
),
145 __field( unsigned int, vec
)
149 tp_assign(vec
, (int)(h
- vec
))
156 * softirq_entry - called immediately before the softirq handler
157 * @h: pointer to struct softirq_action
158 * @vec: pointer to first struct softirq_action in softirq_vec array
160 * When used in combination with the softirq_exit tracepoint
161 * we can determine the softirq handler runtine.
163 LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq
, softirq_entry
,
165 TP_PROTO(struct softirq_action
*h
, struct softirq_action
*vec
),
171 * softirq_exit - called immediately after the softirq handler returns
172 * @h: pointer to struct softirq_action
173 * @vec: pointer to first struct softirq_action in softirq_vec array
175 * When used in combination with the softirq_entry tracepoint
176 * we can determine the softirq handler runtine.
178 LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq
, softirq_exit
,
180 TP_PROTO(struct softirq_action
*h
, struct softirq_action
*vec
),
186 * softirq_raise - called immediately when a softirq is raised
187 * @h: pointer to struct softirq_action
188 * @vec: pointer to first struct softirq_action in softirq_vec array
190 * When used in combination with the softirq_entry tracepoint
191 * we can determine the softirq raise to run latency.
193 LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq
, softirq_raise
,
195 TP_PROTO(struct softirq_action
*h
, struct softirq_action
*vec
),
199 #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
201 #endif /* LTTNG_TRACE_IRQ_H */
203 /* This part must be outside protection */
204 #include "../../../probes/define_trace.h"
This page took 0.033744 seconds and 5 git commands to generate.