1f47d6e4a5bb9496574b4f3a524bc7c2c23ff2a4
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(3,12,0))
13 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status
,
15 TP_PROTO(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_CLASS(rpc_task_status
,
28 TP_PROTO(struct rpc_task
*task
),
33 ctf_integer_hex(const struct rpc_task
*, task
, task
)
34 ctf_integer_hex(const struct rpc_clnt
*, clnt
, task
->tk_client
)
35 ctf_integer(int, status
, task
->tk_status
)
40 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_call_status
,
41 TP_PROTO(struct rpc_task
*task
),
46 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_bind_status
,
47 TP_PROTO(struct rpc_task
*task
),
52 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
53 LTTNG_TRACEPOINT_EVENT(rpc_connect_status
,
54 TP_PROTO(const struct rpc_task
*task
),
59 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
60 ctf_integer(unsigned int, client_id
, task
->tk_client
->cl_clid
)
61 ctf_integer(int, status
, task
->tk_status
)
65 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running
,
67 TP_PROTO(const struct rpc_task
*task
, const void *action
),
69 TP_ARGS(task
, action
),
72 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
73 ctf_integer(unsigned int, client_id
, task
->tk_client
->cl_clid
)
74 ctf_integer_hex(const void *, action
, action
)
75 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
76 ctf_integer(int, status
, task
->tk_status
)
77 ctf_integer(unsigned short, flags
, task
->tk_flags
)
81 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_begin
,
83 TP_PROTO(const struct rpc_task
*task
, const void *action
),
88 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_run_action
,
90 TP_PROTO(const struct rpc_task
*task
, const void *action
),
95 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_complete
,
97 TP_PROTO(const struct rpc_task
*task
, const void *action
),
102 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued
,
104 TP_PROTO(const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
109 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
110 ctf_integer(unsigned int, client_id
, task
->tk_client
->cl_clid
)
111 ctf_integer(unsigned long, timeout
, task
->tk_timeout
)
112 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
113 ctf_integer(int, status
, task
->tk_status
)
114 ctf_integer(unsigned short, flags
, task
->tk_flags
)
115 ctf_string(q_name
, rpc_qname(q
))
119 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_sleep
,
121 TP_PROTO(const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
126 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_wakeup
,
128 TP_PROTO(const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
133 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
134 LTTNG_TRACEPOINT_EVENT(rpc_connect_status
,
135 TP_PROTO(struct rpc_task
*task
, int status
),
137 TP_ARGS(task
, status
),
140 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
141 ctf_integer(unsigned int, client_id
, task
->tk_client
->cl_clid
)
142 ctf_integer(int, status
, status
)
146 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running
,
148 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
150 TP_ARGS(clnt
, task
, action
),
153 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
154 ctf_integer(unsigned int, client_id
, task
->tk_client
->cl_clid
)
155 ctf_integer_hex(const void *, action
, action
)
156 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
157 ctf_integer(int, status
, task
->tk_status
)
158 ctf_integer(unsigned short, flags
, task
->tk_flags
)
162 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_begin
,
164 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
166 TP_ARGS(clnt
, task
, action
)
169 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_run_action
,
171 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
173 TP_ARGS(clnt
, task
, action
)
176 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_complete
,
178 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
180 TP_ARGS(clnt
, task
, action
)
183 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued
,
185 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
187 TP_ARGS(clnt
, task
, q
),
190 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
191 ctf_integer(unsigned int, client_id
, task
->tk_client
->cl_clid
)
192 ctf_integer(unsigned long, timeout
, task
->tk_timeout
)
193 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
194 ctf_integer(int, status
, task
->tk_status
)
195 ctf_integer(unsigned short, flags
, task
->tk_flags
)
196 ctf_string(q_name
, rpc_qname(q
))
200 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_sleep
,
202 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
204 TP_ARGS(clnt
, task
, q
)
207 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_wakeup
,
209 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
211 TP_ARGS(clnt
, task
, q
)
215 LTTNG_TRACEPOINT_EVENT(rpc_connect_status
,
216 TP_PROTO(struct rpc_task
*task
, int status
),
218 TP_ARGS(task
, status
),
221 ctf_integer_hex(const struct rpc_task
*, task
, task
)
222 ctf_integer_hex(const struct rpc_clnt
*, clnt
, task
->tk_client
)
223 ctf_integer(int, status
, status
)
227 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running
,
229 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
231 TP_ARGS(clnt
, task
, action
),
234 ctf_integer_hex(const struct rpc_clnt
*, clnt
, clnt
)
235 ctf_integer_hex(const struct rpc_task
*, task
, task
)
236 ctf_integer_hex(const void *, action
, action
)
237 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
238 ctf_integer(int, status
, task
->tk_status
)
239 ctf_integer(unsigned short, flags
, task
->tk_flags
)
243 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_begin
,
245 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
247 TP_ARGS(clnt
, task
, action
)
250 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_run_action
,
252 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
254 TP_ARGS(clnt
, task
, action
)
257 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_complete
,
259 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const void *action
),
261 TP_ARGS(clnt
, task
, action
)
264 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued
,
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
),
271 ctf_integer_hex(const struct rpc_clnt
*, clnt
, clnt
)
272 ctf_integer_hex(const struct rpc_task
*, task
, task
)
273 ctf_integer(unsigned long, timeout
, task
->tk_timeout
)
274 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
275 ctf_integer(int, status
, task
->tk_status
)
276 ctf_integer(unsigned short, flags
, task
->tk_flags
)
277 ctf_string(q_name
, rpc_qname(q
))
281 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_sleep
,
283 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
285 TP_ARGS(clnt
, task
, q
)
288 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_wakeup
,
290 TP_PROTO(const struct rpc_clnt
*clnt
, const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
292 TP_ARGS(clnt
, task
, q
)
296 #endif /* LTTNG_TRACE_RPC_H */
298 #include <probes/define_trace.h>
This page took 0.051551 seconds and 3 git commands to generate.