2 #define TRACE_SYSTEM rpc
4 #if !defined(LTTNG_TRACE_RPC_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_RPC_H
7 #include <probes/lttng-tracepoint-event.h>
8 #include <linux/sunrpc/sched.h>
9 #include <linux/sunrpc/clnt.h>
11 #ifndef ONCE_LTTNG_RPC_H
12 #define ONCE_LTTNG_RPC_H
14 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
16 int lttng_get_clid(const struct rpc_task
*task
)
18 struct rpc_clnt
*tk_client
;
20 tk_client
= task
->tk_client
;
24 * The cl_clid field is always initialized to positive signed
25 * integers. Negative signed integer values are treated as
28 return (int) tk_client
->cl_clid
;
30 #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
32 #endif /* ONCE_LTTNG_RPC_H */
34 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
35 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status
,
37 TP_PROTO(const struct rpc_task
*task
),
42 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
43 ctf_integer(int, client_id
, lttng_get_clid(task
))
44 ctf_integer(int, status
, task
->tk_status
)
48 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_call_status
,
49 TP_PROTO(const struct rpc_task
*task
),
54 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_bind_status
,
55 TP_PROTO(const struct rpc_task
*task
),
59 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
60 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status
,
62 TP_PROTO(struct rpc_task
*task
),
67 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
68 ctf_integer(int, client_id
, lttng_get_clid(task
))
69 ctf_integer(int, status
, task
->tk_status
)
73 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_call_status
,
74 TP_PROTO(struct rpc_task
*task
),
79 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_bind_status
,
80 TP_PROTO(struct rpc_task
*task
),
85 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status
,
87 TP_PROTO(struct rpc_task
*task
),
92 ctf_integer_hex(const struct rpc_task
*, task
, task
)
93 ctf_integer_hex(const struct rpc_clnt
*, clnt
, task
->tk_client
)
94 ctf_integer(int, status
, task
->tk_status
)
98 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_call_status
,
99 TP_PROTO(struct rpc_task
*task
),
104 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_bind_status
,
105 TP_PROTO(struct rpc_task
*task
),
111 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
112 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_connect_status
,
113 TP_PROTO(const struct rpc_task
*task
),
117 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
118 LTTNG_TRACEPOINT_EVENT(rpc_connect_status
,
119 TP_PROTO(const struct rpc_task
*task
),
124 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
125 ctf_integer(int, client_id
, lttng_get_clid(task
))
126 ctf_integer(int, status
, task
->tk_status
)
129 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
130 LTTNG_TRACEPOINT_EVENT(rpc_connect_status
,
131 TP_PROTO(struct rpc_task
*task
, int status
),
133 TP_ARGS(task
, status
),
136 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
137 ctf_integer(int, client_id
, lttng_get_clid(task
))
138 ctf_integer(int, status
, status
)
142 LTTNG_TRACEPOINT_EVENT(rpc_connect_status
,
143 TP_PROTO(struct rpc_task
*task
, int status
),
145 TP_ARGS(task
, status
),
148 ctf_integer_hex(const struct rpc_task
*, task
, task
)
149 ctf_integer_hex(const struct rpc_clnt
*, clnt
, task
->tk_client
)
150 ctf_integer(int, status
, status
)
155 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
156 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running
,
158 TP_PROTO(const struct rpc_task
*task
, const void *action
),
160 TP_ARGS(task
, action
),
163 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
164 ctf_integer(int, client_id
, lttng_get_clid(task
))
165 ctf_integer_hex(const void *, action
, action
)
166 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
167 ctf_integer(int, status
, task
->tk_status
)
168 ctf_integer(unsigned short, flags
, task
->tk_flags
)
172 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_begin
,
174 TP_PROTO(const struct rpc_task
*task
, const void *action
),
176 TP_ARGS(task
, action
)
179 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_run_action
,
181 TP_PROTO(const struct rpc_task
*task
, const void *action
),
183 TP_ARGS(task
, action
)
186 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_complete
,
188 TP_PROTO(const struct rpc_task
*task
, const void *action
),
190 TP_ARGS(task
, action
)
193 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued
,
195 TP_PROTO(const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
200 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
201 ctf_integer(int, client_id
, lttng_get_clid(task
))
202 ctf_integer(unsigned long, timeout
, task
->tk_timeout
)
203 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
204 ctf_integer(int, status
, task
->tk_status
)
205 ctf_integer(unsigned short, flags
, task
->tk_flags
)
206 ctf_string(q_name
, rpc_qname(q
))
210 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_sleep
,
212 TP_PROTO(const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
217 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_wakeup
,
219 TP_PROTO(const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
224 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
225 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running
,
227 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
229 TP_ARGS(clnt
, task
, action
),
232 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
233 ctf_integer(int, client_id
, lttng_get_clid(task
))
234 ctf_integer_hex(const void *, action
, action
)
235 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
236 ctf_integer(int, status
, task
->tk_status
)
237 ctf_integer(unsigned short, flags
, task
->tk_flags
)
241 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_begin
,
243 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
245 TP_ARGS(clnt
, task
, action
)
248 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_run_action
,
250 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
252 TP_ARGS(clnt
, task
, action
)
255 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_complete
,
257 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
259 TP_ARGS(clnt
, task
, action
)
262 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued
,
264 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
266 TP_ARGS(clnt
, task
, q
),
269 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
270 ctf_integer(int, client_id
, lttng_get_clid(task
))
271 ctf_integer(unsigned long, timeout
, task
->tk_timeout
)
272 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
273 ctf_integer(int, status
, task
->tk_status
)
274 ctf_integer(unsigned short, flags
, task
->tk_flags
)
275 ctf_string(q_name
, rpc_qname(q
))
279 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_sleep
,
281 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
283 TP_ARGS(clnt
, task
, q
)
286 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_wakeup
,
288 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
290 TP_ARGS(clnt
, task
, q
)
294 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running
,
296 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
298 TP_ARGS(clnt
, task
, action
),
301 ctf_integer_hex(const struct rpc_clnt
*, clnt
, clnt
)
302 ctf_integer_hex(const struct rpc_task
*, task
, task
)
303 ctf_integer_hex(const void *, action
, action
)
304 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
305 ctf_integer(int, status
, task
->tk_status
)
306 ctf_integer(unsigned short, flags
, task
->tk_flags
)
310 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_begin
,
312 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
314 TP_ARGS(clnt
, task
, action
)
317 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_run_action
,
319 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
321 TP_ARGS(clnt
, task
, action
)
324 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_complete
,
326 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
328 TP_ARGS(clnt
, task
, action
)
331 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued
,
333 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
335 TP_ARGS(clnt
, task
, q
),
338 ctf_integer_hex(const struct rpc_clnt
*, clnt
, clnt
)
339 ctf_integer_hex(const struct rpc_task
*, task
, task
)
340 ctf_integer(unsigned long, timeout
, task
->tk_timeout
)
341 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
342 ctf_integer(int, status
, task
->tk_status
)
343 ctf_integer(unsigned short, flags
, task
->tk_flags
)
344 ctf_string(q_name
, rpc_qname(q
))
348 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_sleep
,
350 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
352 TP_ARGS(clnt
, task
, q
)
355 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_wakeup
,
357 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
359 TP_ARGS(clnt
, task
, q
)
363 #endif /* LTTNG_TRACE_RPC_H */
365 #include <probes/define_trace.h>
This page took 0.046622 seconds and 4 git commands to generate.