Fix: scsi: sd: Atomic write support added in 6.11-rc1
[lttng-modules.git] / include / instrumentation / events / irq.h
CommitLineData
61baff6e
MJ
1// SPDX-FileCopyrightText: 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
f62b389e
MD
5#undef TRACE_SYSTEM
6#define TRACE_SYSTEM irq
7
3bc29f0a
MD
8#if !defined(LTTNG_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ)
9#define LTTNG_TRACE_IRQ_H
f62b389e 10
3b4aafcb 11#include <lttng/tracepoint-event.h>
f62b389e
MD
12
13#ifndef _TRACE_IRQ_DEF_
14#define _TRACE_IRQ_DEF_
15
16struct irqaction;
17struct softirq_action;
18
f62b389e
MD
19#endif /* _TRACE_IRQ_DEF_ */
20
21/**
22 * irq_handler_entry - called immediately before the irq action handler
23 * @irq: irq number
24 * @action: pointer to struct irqaction
25 *
26 * The struct irqaction pointed to by @action contains various
27 * information about the handler, including the device name,
28 * @action->name, and the device id, @action->dev_id. When used in
29 * conjunction with the irq_handler_exit tracepoint, we can figure
30 * out irq handler latencies.
31 */
3bc29f0a 32LTTNG_TRACEPOINT_EVENT(irq_handler_entry,
f62b389e
MD
33
34 TP_PROTO(int irq, struct irqaction *action),
35
36 TP_ARGS(irq, action),
37
f127e61e
MD
38 TP_FIELDS(
39 ctf_integer(int, irq, irq)
40 ctf_string(name, action->name)
41 )
f62b389e
MD
42)
43
44/**
45 * irq_handler_exit - called immediately after the irq action handler returns
46 * @irq: irq number
47 * @action: pointer to struct irqaction
48 * @ret: return value
49 *
50 * If the @ret value is set to IRQ_HANDLED, then we know that the corresponding
51 * @action->handler scuccessully handled this irq. Otherwise, the irq might be
52 * a shared irq line, or the irq was not handled successfully. Can be used in
53 * conjunction with the irq_handler_entry to understand irq handler latencies.
54 */
3bc29f0a 55LTTNG_TRACEPOINT_EVENT(irq_handler_exit,
f62b389e
MD
56
57 TP_PROTO(int irq, struct irqaction *action, int ret),
58
59 TP_ARGS(irq, action, ret),
60
f127e61e
MD
61 TP_FIELDS(
62 ctf_integer(int, irq, irq)
63 ctf_integer(int, ret, ret)
64 )
f62b389e
MD
65)
66
9bbf98da 67LTTNG_TRACEPOINT_EVENT_CLASS(irq_softirq,
f62b389e
MD
68
69 TP_PROTO(unsigned int vec_nr),
70
71 TP_ARGS(vec_nr),
72
f127e61e
MD
73 TP_FIELDS(
74 ctf_integer(unsigned int, vec, vec_nr)
75 )
f62b389e
MD
76)
77
78/**
79 * softirq_entry - called immediately before the softirq handler
80 * @vec_nr: softirq vector number
81 *
82 * When used in combination with the softirq_exit tracepoint
83 * we can determine the softirq handler runtine.
84 */
9bbf98da
MD
85LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq, softirq_entry,
86
87 irq_softirq_entry,
f62b389e
MD
88
89 TP_PROTO(unsigned int vec_nr),
90
91 TP_ARGS(vec_nr)
92)
93
94/**
95 * softirq_exit - called immediately after the softirq handler returns
96 * @vec_nr: softirq vector number
97 *
98 * When used in combination with the softirq_entry tracepoint
99 * we can determine the softirq handler runtine.
100 */
9bbf98da
MD
101LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq, softirq_exit,
102
103 irq_softirq_exit,
f62b389e
MD
104
105 TP_PROTO(unsigned int vec_nr),
106
107 TP_ARGS(vec_nr)
108)
109
110/**
111 * softirq_raise - called immediately when a softirq is raised
112 * @vec_nr: softirq vector number
113 *
114 * When used in combination with the softirq_entry tracepoint
115 * we can determine the softirq raise to run latency.
116 */
9bbf98da
MD
117LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq, softirq_raise,
118
119 irq_softirq_raise,
f62b389e
MD
120
121 TP_PROTO(unsigned int vec_nr),
122
123 TP_ARGS(vec_nr)
124)
125
3bc29f0a 126#endif /* LTTNG_TRACE_IRQ_H */
f62b389e
MD
127
128/* This part must be outside protection */
3b4aafcb 129#include <lttng/define_trace.h>
This page took 0.066283 seconds and 4 git commands to generate.