1 /* SPDX-License-Identifier: GPL-2.0-only */
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 #ifndef ONCE_LTTNG_RPC_H
13 #define ONCE_LTTNG_RPC_H
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
;
31 #endif /* ONCE_LTTNG_RPC_H */
33 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status
,
35 TP_PROTO(const struct rpc_task
*task
),
40 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
41 ctf_integer(int, client_id
, lttng_get_clid(task
))
42 ctf_integer(int, status
, task
->tk_status
)
46 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_call_status
,
47 TP_PROTO(const struct rpc_task
*task
),
52 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_bind_status
,
53 TP_PROTO(const struct rpc_task
*task
),
58 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status
, rpc_connect_status
,
59 TP_PROTO(const struct rpc_task
*task
),
64 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running
,
66 TP_PROTO(const struct rpc_task
*task
, const void *action
),
68 TP_ARGS(task
, action
),
71 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
72 ctf_integer(int, client_id
, lttng_get_clid(task
))
73 ctf_integer_hex(const void *, action
, action
)
74 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
75 ctf_integer(int, status
, task
->tk_status
)
76 ctf_integer(unsigned short, flags
, task
->tk_flags
)
80 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_begin
,
82 TP_PROTO(const struct rpc_task
*task
, const void *action
),
87 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_run_action
,
89 TP_PROTO(const struct rpc_task
*task
, const void *action
),
94 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running
, rpc_task_complete
,
96 TP_PROTO(const struct rpc_task
*task
, const void *action
),
101 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued
,
103 TP_PROTO(const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
108 ctf_integer(unsigned int, task_id
, task
->tk_pid
)
109 ctf_integer(int, client_id
, lttng_get_clid(task
))
110 ctf_integer(unsigned long, timeout
, task
->tk_timeout
)
111 ctf_integer(unsigned long, runstate
, task
->tk_runstate
)
112 ctf_integer(int, status
, task
->tk_status
)
113 ctf_integer(unsigned short, flags
, task
->tk_flags
)
114 ctf_string(q_name
, rpc_qname(q
))
118 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_sleep
,
120 TP_PROTO(const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
125 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued
, rpc_task_wakeup
,
127 TP_PROTO(const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
132 #endif /* LTTNG_TRACE_RPC_H */
134 #include <probes/define_trace.h>
This page took 0.034317 seconds and 5 git commands to generate.