1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM irq
5 #if !defined(LTTNG_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_IRQ_H
8 #include <probes/lttng-tracepoint-event.h>
10 #ifndef _TRACE_IRQ_DEF_
11 #define _TRACE_IRQ_DEF_
14 struct softirq_action
;
16 #endif /* _TRACE_IRQ_DEF_ */
19 * irq_handler_entry - called immediately before the irq action handler
21 * @action: pointer to struct irqaction
23 * The struct irqaction pointed to by @action contains various
24 * information about the handler, including the device name,
25 * @action->name, and the device id, @action->dev_id. When used in
26 * conjunction with the irq_handler_exit tracepoint, we can figure
27 * out irq handler latencies.
29 LTTNG_TRACEPOINT_EVENT(irq_handler_entry
,
31 TP_PROTO(int irq
, struct irqaction
*action
),
36 ctf_integer(int, irq
, irq
)
37 ctf_string(name
, action
->name
)
42 * irq_handler_exit - called immediately after the irq action handler returns
44 * @action: pointer to struct irqaction
47 * If the @ret value is set to IRQ_HANDLED, then we know that the corresponding
48 * @action->handler scuccessully handled this irq. Otherwise, the irq might be
49 * a shared irq line, or the irq was not handled successfully. Can be used in
50 * conjunction with the irq_handler_entry to understand irq handler latencies.
52 LTTNG_TRACEPOINT_EVENT(irq_handler_exit
,
54 TP_PROTO(int irq
, struct irqaction
*action
, int ret
),
56 TP_ARGS(irq
, action
, ret
),
59 ctf_integer(int, irq
, irq
)
60 ctf_integer(int, ret
, ret
)
64 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
65 LTTNG_TRACEPOINT_EVENT_CLASS(irq_softirq
,
67 TP_PROTO(unsigned int vec_nr
),
72 ctf_integer(unsigned int, vec
, vec_nr
)
77 * softirq_entry - called immediately before the softirq handler
78 * @vec_nr: softirq vector number
80 * When used in combination with the softirq_exit tracepoint
81 * we can determine the softirq handler runtine.
83 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq
, softirq_entry
,
87 TP_PROTO(unsigned int vec_nr
),
93 * softirq_exit - called immediately after the softirq handler returns
94 * @vec_nr: softirq vector number
96 * When used in combination with the softirq_entry tracepoint
97 * we can determine the softirq handler runtine.
99 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq
, softirq_exit
,
103 TP_PROTO(unsigned int vec_nr
),
109 * softirq_raise - called immediately when a softirq is raised
110 * @vec_nr: softirq vector number
112 * When used in combination with the softirq_entry tracepoint
113 * we can determine the softirq raise to run latency.
115 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq
, softirq_raise
,
119 TP_PROTO(unsigned int vec_nr
),
123 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
124 LTTNG_TRACEPOINT_EVENT_CLASS(irq_softirq
,
126 TP_PROTO(struct softirq_action
*h
, struct softirq_action
*vec
),
131 ctf_integer(unsigned int, vec
, (int)(h
- vec
))
136 * softirq_entry - called immediately before the softirq handler
137 * @h: pointer to struct softirq_action
138 * @vec: pointer to first struct softirq_action in softirq_vec array
140 * When used in combination with the softirq_exit tracepoint
141 * we can determine the softirq handler runtine.
143 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq
, softirq_entry
,
147 TP_PROTO(struct softirq_action
*h
, struct softirq_action
*vec
),
153 * softirq_exit - called immediately after the softirq handler returns
154 * @h: pointer to struct softirq_action
155 * @vec: pointer to first struct softirq_action in softirq_vec array
157 * When used in combination with the softirq_entry tracepoint
158 * we can determine the softirq handler runtine.
160 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq
, softirq_exit
,
164 TP_PROTO(struct softirq_action
*h
, struct softirq_action
*vec
),
170 * softirq_raise - called immediately when a softirq is raised
171 * @h: pointer to struct softirq_action
172 * @vec: pointer to first struct softirq_action in softirq_vec array
174 * When used in combination with the softirq_entry tracepoint
175 * we can determine the softirq raise to run latency.
177 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq
, softirq_raise
,
181 TP_PROTO(struct softirq_action
*h
, struct softirq_action
*vec
),
185 #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
187 #endif /* LTTNG_TRACE_IRQ_H */
189 /* This part must be outside protection */
190 #include <probes/define_trace.h>
This page took 0.068956 seconds and 4 git commands to generate.