1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM rpc
5 #if !defined(LTTNG_TRACE_RPC_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_RPC_H
8 #include <probes/lttng-tracepoint-event.h>
9 #include <linux/sunrpc/sched.h>
10 #include <linux/sunrpc/clnt.h>
12 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
13 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status
,
15 TP_PROTO(const struct rpc_task
*task
),
20 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
21 ctf_integer(unsigned int, client_id
, task
->tk_client
->cl_clid
)
22 ctf_integer(int, status
, task
->tk_status
)
26 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_call_status
,
27 TP_PROTO(const struct rpc_task
*task
),
32 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_bind_status
,
33 TP_PROTO(const struct rpc_task
*task
),
37 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
38 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status
,
40 TP_PROTO(struct rpc_task
*task
),
45 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
46 ctf_integer(unsigned int, client_id
, task
->tk_client
->cl_clid
)
47 ctf_integer(int, status
, task
->tk_status
)
51 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_call_status
,
52 TP_PROTO(struct rpc_task
*task
),
57 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_bind_status
,
58 TP_PROTO(struct rpc_task
*task
),
63 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status
,
65 TP_PROTO(struct rpc_task
*task
),
70 ctf_integer_hex(const struct rpc_task
*, task
, task
)
71 ctf_integer_hex(const struct rpc_clnt
*, clnt
, task
->tk_client
)
72 ctf_integer(int, status
, task
->tk_status
)
76 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_call_status
,
77 TP_PROTO(struct rpc_task
*task
),
82 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_bind_status
,
83 TP_PROTO(struct rpc_task
*task
),
89 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
90 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_connect_status
,
91 TP_PROTO(const struct rpc_task
*task
),
95 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
96 LTTNG_TRACEPOINT_EVENT(rpc_connect_status
,
97 TP_PROTO(const struct rpc_task
*task
),
102 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
103 ctf_integer(unsigned int, client_id
, task
->tk_client
->cl_clid
)
104 ctf_integer(int, status
, task
->tk_status
)
107 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
108 LTTNG_TRACEPOINT_EVENT(rpc_connect_status
,
109 TP_PROTO(struct rpc_task
*task
, int status
),
111 TP_ARGS(task
, status
),
114 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
115 ctf_integer(unsigned int, client_id
, task
->tk_client
->cl_clid
)
116 ctf_integer(int, status
, status
)
120 LTTNG_TRACEPOINT_EVENT(rpc_connect_status
,
121 TP_PROTO(struct rpc_task
*task
, int status
),
123 TP_ARGS(task
, status
),
126 ctf_integer_hex(const struct rpc_task
*, task
, task
)
127 ctf_integer_hex(const struct rpc_clnt
*, clnt
, task
->tk_client
)
128 ctf_integer(int, status
, status
)
133 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
134 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running
,
136 TP_PROTO(const struct rpc_task
*task
, const void *action
),
138 TP_ARGS(task
, action
),
141 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
142 ctf_integer(unsigned int, client_id
, task
->tk_client
->cl_clid
)
143 ctf_integer_hex(const void *, action
, action
)
144 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
145 ctf_integer(int, status
, task
->tk_status
)
146 ctf_integer(unsigned short, flags
, task
->tk_flags
)
150 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_begin
,
152 TP_PROTO(const struct rpc_task
*task
, const void *action
),
154 TP_ARGS(task
, action
)
157 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_run_action
,
159 TP_PROTO(const struct rpc_task
*task
, const void *action
),
161 TP_ARGS(task
, action
)
164 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_complete
,
166 TP_PROTO(const struct rpc_task
*task
, const void *action
),
168 TP_ARGS(task
, action
)
171 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued
,
173 TP_PROTO(const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
178 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
179 ctf_integer(unsigned int, client_id
, task
->tk_client
->cl_clid
)
180 ctf_integer(unsigned long, timeout
, task
->tk_timeout
)
181 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
182 ctf_integer(int, status
, task
->tk_status
)
183 ctf_integer(unsigned short, flags
, task
->tk_flags
)
184 ctf_string(q_name
, rpc_qname(q
))
188 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_sleep
,
190 TP_PROTO(const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
195 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_wakeup
,
197 TP_PROTO(const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
202 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
203 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running
,
205 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
207 TP_ARGS(clnt
, task
, action
),
210 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
211 ctf_integer(unsigned int, client_id
, task
->tk_client
->cl_clid
)
212 ctf_integer_hex(const void *, action
, action
)
213 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
214 ctf_integer(int, status
, task
->tk_status
)
215 ctf_integer(unsigned short, flags
, task
->tk_flags
)
219 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_begin
,
221 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
223 TP_ARGS(clnt
, task
, action
)
226 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_run_action
,
228 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
230 TP_ARGS(clnt
, task
, action
)
233 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_complete
,
235 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
237 TP_ARGS(clnt
, task
, action
)
240 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued
,
242 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
244 TP_ARGS(clnt
, task
, q
),
247 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
248 ctf_integer(unsigned int, client_id
, task
->tk_client
->cl_clid
)
249 ctf_integer(unsigned long, timeout
, task
->tk_timeout
)
250 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
251 ctf_integer(int, status
, task
->tk_status
)
252 ctf_integer(unsigned short, flags
, task
->tk_flags
)
253 ctf_string(q_name
, rpc_qname(q
))
257 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_sleep
,
259 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
261 TP_ARGS(clnt
, task
, q
)
264 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_wakeup
,
266 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
268 TP_ARGS(clnt
, task
, q
)
272 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running
,
274 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
276 TP_ARGS(clnt
, task
, action
),
279 ctf_integer_hex(const struct rpc_clnt
*, clnt
, clnt
)
280 ctf_integer_hex(const struct rpc_task
*, task
, task
)
281 ctf_integer_hex(const void *, action
, action
)
282 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
283 ctf_integer(int, status
, task
->tk_status
)
284 ctf_integer(unsigned short, flags
, task
->tk_flags
)
288 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_begin
,
290 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
292 TP_ARGS(clnt
, task
, action
)
295 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_run_action
,
297 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
299 TP_ARGS(clnt
, task
, action
)
302 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_complete
,
304 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
306 TP_ARGS(clnt
, task
, action
)
309 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued
,
311 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
313 TP_ARGS(clnt
, task
, q
),
316 ctf_integer_hex(const struct rpc_clnt
*, clnt
, clnt
)
317 ctf_integer_hex(const struct rpc_task
*, task
, task
)
318 ctf_integer(unsigned long, timeout
, task
->tk_timeout
)
319 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
320 ctf_integer(int, status
, task
->tk_status
)
321 ctf_integer(unsigned short, flags
, task
->tk_flags
)
322 ctf_string(q_name
, rpc_qname(q
))
326 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_sleep
,
328 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
330 TP_ARGS(clnt
, task
, q
)
333 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_wakeup
,
335 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
337 TP_ARGS(clnt
, task
, q
)
341 #endif /* LTTNG_TRACE_RPC_H */
343 #include <probes/define_trace.h>
This page took 0.042897 seconds and 4 git commands to generate.