Fix: sunrpc instrumentation for 4.17
[lttng-modules.git] / instrumentation / events / lttng-module / rpc.h
... / ...
CommitLineData
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM rpc
3
4#if !defined(LTTNG_TRACE_RPC_H) || defined(TRACE_HEADER_MULTI_READ)
5#define LTTNG_TRACE_RPC_H
6
7#include <probes/lttng-tracepoint-event.h>
8#include <linux/sunrpc/sched.h>
9#include <linux/sunrpc/clnt.h>
10
11LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
12
13 TP_PROTO(struct rpc_task *task),
14
15 TP_ARGS(task),
16
17 TP_FIELDS(
18 ctf_integer_hex(const struct rpc_task *, task, task)
19 ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client)
20 ctf_integer(int, status, task->tk_status)
21 )
22)
23
24LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_call_status,
25 TP_PROTO(struct rpc_task *task),
26
27 TP_ARGS(task)
28)
29
30LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status,
31 TP_PROTO(struct rpc_task *task),
32
33 TP_ARGS(task)
34)
35
36#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
37LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
38 TP_PROTO(const struct rpc_task *task),
39
40 TP_ARGS(task),
41
42 TP_FIELDS(
43 ctf_integer_hex(const struct rpc_task *, task, task)
44 ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client)
45 ctf_integer(int, status, task->tk_status)
46 )
47)
48
49LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
50
51 TP_PROTO(const struct rpc_task *task, const void *action),
52
53 TP_ARGS(task, action),
54
55 TP_FIELDS(
56 ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client)
57 ctf_integer_hex(const struct rpc_task *, task, task)
58 ctf_integer_hex(const void *, action, action)
59 ctf_integer(unsigned long, runstate, task->tk_runstate)
60 ctf_integer(int, status, task->tk_status)
61 ctf_integer(unsigned short, flags, task->tk_flags)
62 )
63)
64
65LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_begin,
66
67 TP_PROTO(const struct rpc_task *task, const void *action),
68
69 TP_ARGS(task, action)
70)
71
72LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_run_action,
73
74 TP_PROTO(const struct rpc_task *task, const void *action),
75
76 TP_ARGS(task, action)
77)
78
79LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_complete,
80
81 TP_PROTO(const struct rpc_task *task, const void *action),
82
83 TP_ARGS(task, action)
84)
85
86LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued,
87
88 TP_PROTO(const struct rpc_task *task, const struct rpc_wait_queue *q),
89
90 TP_ARGS(task, q),
91
92 TP_FIELDS(
93 ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client)
94 ctf_integer_hex(const struct rpc_task *, task, task)
95 ctf_integer(unsigned long, timeout, task->tk_timeout)
96 ctf_integer(unsigned long, runstate, task->tk_runstate)
97 ctf_integer(int, status, task->tk_status)
98 ctf_integer(unsigned short, flags, task->tk_flags)
99 ctf_string(q_name, rpc_qname(q))
100 )
101)
102
103LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_sleep,
104
105 TP_PROTO(const struct rpc_task *task, const struct rpc_wait_queue *q),
106
107 TP_ARGS(task, q)
108)
109
110LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup,
111
112 TP_PROTO(const struct rpc_task *task, const struct rpc_wait_queue *q),
113
114 TP_ARGS(task, q)
115)
116
117#else
118LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
119 TP_PROTO(struct rpc_task *task, int status),
120
121 TP_ARGS(task, status),
122
123 TP_FIELDS(
124 ctf_integer_hex(const struct rpc_task *, task, task)
125 ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client)
126 ctf_integer(int, status, status)
127 )
128)
129
130LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
131
132 TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
133
134 TP_ARGS(clnt, task, action),
135
136 TP_FIELDS(
137 ctf_integer_hex(const struct rpc_clnt *, clnt, clnt)
138 ctf_integer_hex(const struct rpc_task *, task, task)
139 ctf_integer_hex(const void *, action, action)
140 ctf_integer(unsigned long, runstate, task->tk_runstate)
141 ctf_integer(int, status, task->tk_status)
142 ctf_integer(unsigned short, flags, task->tk_flags)
143 )
144)
145
146LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_begin,
147
148 TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
149
150 TP_ARGS(clnt, task, action)
151)
152
153LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_run_action,
154
155 TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
156
157 TP_ARGS(clnt, task, action)
158)
159
160LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_complete,
161
162 TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
163
164 TP_ARGS(clnt, task, action)
165)
166
167LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued,
168
169 TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q),
170
171 TP_ARGS(clnt, task, q),
172
173 TP_FIELDS(
174 ctf_integer_hex(const struct rpc_clnt *, clnt, clnt)
175 ctf_integer_hex(const struct rpc_task *, task, task)
176 ctf_integer(unsigned long, timeout, task->tk_timeout)
177 ctf_integer(unsigned long, runstate, task->tk_runstate)
178 ctf_integer(int, status, task->tk_status)
179 ctf_integer(unsigned short, flags, task->tk_flags)
180 ctf_string(q_name, rpc_qname(q))
181 )
182)
183
184LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_sleep,
185
186 TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q),
187
188 TP_ARGS(clnt, task, q)
189)
190
191LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup,
192
193 TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q),
194
195 TP_ARGS(clnt, task, q)
196)
197#endif
198
199#endif /* LTTNG_TRACE_RPC_H */
200
201#include <probes/define_trace.h>
This page took 0.023424 seconds and 4 git commands to generate.