68c622c0c63e09d7192951d3c62d750ee99b42f5
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
? task
->tk_client
->cl_clid
: -1)
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
?
180 task
->tk_client
->cl_clid
: -1)
181 ctf_integer(unsigned long, timeout
, task
->tk_timeout
)
182 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
183 ctf_integer(int, status
, task
->tk_status
)
184 ctf_integer(unsigned short, flags
, task
->tk_flags
)
185 ctf_string(q_name
, rpc_qname(q
))
189 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_sleep
,
191 TP_PROTO(const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
196 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_wakeup
,
198 TP_PROTO(const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
203 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
204 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running
,
206 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
208 TP_ARGS(clnt
, task
, action
),
211 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
212 ctf_integer(unsigned int, client_id
, task
->tk_client
? task
->tk_client
->cl_clid
: -1)
213 ctf_integer_hex(const void *, action
, action
)
214 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
215 ctf_integer(int, status
, task
->tk_status
)
216 ctf_integer(unsigned short, flags
, task
->tk_flags
)
220 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_begin
,
222 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
224 TP_ARGS(clnt
, task
, action
)
227 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_run_action
,
229 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
231 TP_ARGS(clnt
, task
, action
)
234 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_complete
,
236 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
238 TP_ARGS(clnt
, task
, action
)
241 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued
,
243 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
245 TP_ARGS(clnt
, task
, q
),
248 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
249 ctf_integer(unsigned int, client_id
, task
->tk_client
->cl_clid
)
250 ctf_integer(unsigned long, timeout
, task
->tk_timeout
)
251 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
252 ctf_integer(int, status
, task
->tk_status
)
253 ctf_integer(unsigned short, flags
, task
->tk_flags
)
254 ctf_string(q_name
, rpc_qname(q
))
258 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_sleep
,
260 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
262 TP_ARGS(clnt
, task
, q
)
265 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_wakeup
,
267 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
269 TP_ARGS(clnt
, task
, q
)
273 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running
,
275 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
277 TP_ARGS(clnt
, task
, action
),
280 ctf_integer_hex(const struct rpc_clnt
*, clnt
, clnt
)
281 ctf_integer_hex(const struct rpc_task
*, task
, task
)
282 ctf_integer_hex(const void *, action
, action
)
283 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
284 ctf_integer(int, status
, task
->tk_status
)
285 ctf_integer(unsigned short, flags
, task
->tk_flags
)
289 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_begin
,
291 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
293 TP_ARGS(clnt
, task
, action
)
296 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_run_action
,
298 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
300 TP_ARGS(clnt
, task
, action
)
303 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_complete
,
305 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
307 TP_ARGS(clnt
, task
, action
)
310 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued
,
312 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
314 TP_ARGS(clnt
, task
, q
),
317 ctf_integer_hex(const struct rpc_clnt
*, clnt
, clnt
)
318 ctf_integer_hex(const struct rpc_task
*, task
, task
)
319 ctf_integer(unsigned long, timeout
, task
->tk_timeout
)
320 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
321 ctf_integer(int, status
, task
->tk_status
)
322 ctf_integer(unsigned short, flags
, task
->tk_flags
)
323 ctf_string(q_name
, rpc_qname(q
))
327 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_sleep
,
329 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
331 TP_ARGS(clnt
, task
, q
)
334 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_wakeup
,
336 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
338 TP_ARGS(clnt
, task
, q
)
342 #endif /* LTTNG_TRACE_RPC_H */
344 #include <probes/define_trace.h>
This page took 0.035861 seconds and 4 git commands to generate.