Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 2 | #undef TRACE_SYSTEM |
| 3 | #define TRACE_SYSTEM sunrpc |
| 4 | |
| 5 | #if !defined(_TRACE_SUNRPC_H) || defined(TRACE_HEADER_MULTI_READ) |
| 6 | #define _TRACE_SUNRPC_H |
| 7 | |
| 8 | #include <linux/sunrpc/sched.h> |
| 9 | #include <linux/sunrpc/clnt.h> |
Jeff Layton | 860a0d9 | 2014-10-28 14:24:12 -0400 | [diff] [blame] | 10 | #include <linux/sunrpc/svc.h> |
Jeff Layton | 1a867a0 | 2014-10-28 14:24:14 -0400 | [diff] [blame] | 11 | #include <linux/sunrpc/xprtsock.h> |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 12 | #include <linux/sunrpc/svc_xprt.h> |
Trond Myklebust | 40b5ea0 | 2013-09-04 12:16:23 -0400 | [diff] [blame] | 13 | #include <net/tcp_states.h> |
| 14 | #include <linux/net.h> |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 15 | #include <linux/tracepoint.h> |
| 16 | |
Chuck Lever | 998024d | 2020-03-17 15:06:31 -0400 | [diff] [blame] | 17 | TRACE_DEFINE_ENUM(SOCK_STREAM); |
| 18 | TRACE_DEFINE_ENUM(SOCK_DGRAM); |
| 19 | TRACE_DEFINE_ENUM(SOCK_RAW); |
| 20 | TRACE_DEFINE_ENUM(SOCK_RDM); |
| 21 | TRACE_DEFINE_ENUM(SOCK_SEQPACKET); |
| 22 | TRACE_DEFINE_ENUM(SOCK_DCCP); |
| 23 | TRACE_DEFINE_ENUM(SOCK_PACKET); |
| 24 | |
| 25 | #define show_socket_type(type) \ |
| 26 | __print_symbolic(type, \ |
| 27 | { SOCK_STREAM, "STREAM" }, \ |
| 28 | { SOCK_DGRAM, "DGRAM" }, \ |
| 29 | { SOCK_RAW, "RAW" }, \ |
| 30 | { SOCK_RDM, "RDM" }, \ |
| 31 | { SOCK_SEQPACKET, "SEQPACKET" }, \ |
| 32 | { SOCK_DCCP, "DCCP" }, \ |
| 33 | { SOCK_PACKET, "PACKET" }) |
| 34 | |
| 35 | /* This list is known to be incomplete, add new enums as needed. */ |
| 36 | TRACE_DEFINE_ENUM(AF_UNSPEC); |
| 37 | TRACE_DEFINE_ENUM(AF_UNIX); |
| 38 | TRACE_DEFINE_ENUM(AF_LOCAL); |
| 39 | TRACE_DEFINE_ENUM(AF_INET); |
| 40 | TRACE_DEFINE_ENUM(AF_INET6); |
| 41 | |
| 42 | #define rpc_show_address_family(family) \ |
| 43 | __print_symbolic(family, \ |
| 44 | { AF_UNSPEC, "AF_UNSPEC" }, \ |
| 45 | { AF_UNIX, "AF_UNIX" }, \ |
| 46 | { AF_LOCAL, "AF_LOCAL" }, \ |
| 47 | { AF_INET, "AF_INET" }, \ |
| 48 | { AF_INET6, "AF_INET6" }) |
| 49 | |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 50 | DECLARE_EVENT_CLASS(rpc_xdr_buf_class, |
Chuck Lever | b20dfc3 | 2020-03-02 15:01:08 -0500 | [diff] [blame] | 51 | TP_PROTO( |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 52 | const struct rpc_task *task, |
Chuck Lever | b20dfc3 | 2020-03-02 15:01:08 -0500 | [diff] [blame] | 53 | const struct xdr_buf *xdr |
| 54 | ), |
| 55 | |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 56 | TP_ARGS(task, xdr), |
Chuck Lever | b20dfc3 | 2020-03-02 15:01:08 -0500 | [diff] [blame] | 57 | |
| 58 | TP_STRUCT__entry( |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 59 | __field(unsigned int, task_id) |
| 60 | __field(unsigned int, client_id) |
Chuck Lever | b20dfc3 | 2020-03-02 15:01:08 -0500 | [diff] [blame] | 61 | __field(const void *, head_base) |
| 62 | __field(size_t, head_len) |
| 63 | __field(const void *, tail_base) |
| 64 | __field(size_t, tail_len) |
| 65 | __field(unsigned int, page_len) |
| 66 | __field(unsigned int, msg_len) |
| 67 | ), |
| 68 | |
| 69 | TP_fast_assign( |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 70 | __entry->task_id = task->tk_pid; |
Scott Mayhew | c3213d2 | 2020-11-12 15:17:32 -0500 | [diff] [blame] | 71 | __entry->client_id = task->tk_client ? |
| 72 | task->tk_client->cl_clid : -1; |
Chuck Lever | b20dfc3 | 2020-03-02 15:01:08 -0500 | [diff] [blame] | 73 | __entry->head_base = xdr->head[0].iov_base; |
| 74 | __entry->head_len = xdr->head[0].iov_len; |
| 75 | __entry->tail_base = xdr->tail[0].iov_base; |
| 76 | __entry->tail_len = xdr->tail[0].iov_len; |
| 77 | __entry->page_len = xdr->page_len; |
| 78 | __entry->msg_len = xdr->len; |
| 79 | ), |
| 80 | |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 81 | TP_printk("task:%u@%u head=[%p,%zu] page=%u tail=[%p,%zu] len=%u", |
| 82 | __entry->task_id, __entry->client_id, |
Chuck Lever | b20dfc3 | 2020-03-02 15:01:08 -0500 | [diff] [blame] | 83 | __entry->head_base, __entry->head_len, __entry->page_len, |
| 84 | __entry->tail_base, __entry->tail_len, __entry->msg_len |
| 85 | ) |
| 86 | ); |
| 87 | |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 88 | #define DEFINE_RPCXDRBUF_EVENT(name) \ |
| 89 | DEFINE_EVENT(rpc_xdr_buf_class, \ |
| 90 | rpc_xdr_##name, \ |
Chuck Lever | b20dfc3 | 2020-03-02 15:01:08 -0500 | [diff] [blame] | 91 | TP_PROTO( \ |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 92 | const struct rpc_task *task, \ |
Chuck Lever | b20dfc3 | 2020-03-02 15:01:08 -0500 | [diff] [blame] | 93 | const struct xdr_buf *xdr \ |
| 94 | ), \ |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 95 | TP_ARGS(task, xdr)) |
Chuck Lever | b20dfc3 | 2020-03-02 15:01:08 -0500 | [diff] [blame] | 96 | |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 97 | DEFINE_RPCXDRBUF_EVENT(sendto); |
| 98 | DEFINE_RPCXDRBUF_EVENT(recvfrom); |
| 99 | DEFINE_RPCXDRBUF_EVENT(reply_pages); |
| 100 | |
Chuck Lever | b20dfc3 | 2020-03-02 15:01:08 -0500 | [diff] [blame] | 101 | |
Chuck Lever | 42aad0d | 2020-05-12 17:13:39 -0400 | [diff] [blame] | 102 | DECLARE_EVENT_CLASS(rpc_clnt_class, |
| 103 | TP_PROTO( |
| 104 | const struct rpc_clnt *clnt |
| 105 | ), |
| 106 | |
| 107 | TP_ARGS(clnt), |
| 108 | |
| 109 | TP_STRUCT__entry( |
| 110 | __field(unsigned int, client_id) |
| 111 | ), |
| 112 | |
| 113 | TP_fast_assign( |
| 114 | __entry->client_id = clnt->cl_clid; |
| 115 | ), |
| 116 | |
| 117 | TP_printk("clid=%u", __entry->client_id) |
| 118 | ); |
| 119 | |
| 120 | #define DEFINE_RPC_CLNT_EVENT(name) \ |
| 121 | DEFINE_EVENT(rpc_clnt_class, \ |
| 122 | rpc_clnt_##name, \ |
| 123 | TP_PROTO( \ |
| 124 | const struct rpc_clnt *clnt \ |
| 125 | ), \ |
| 126 | TP_ARGS(clnt)) |
| 127 | |
| 128 | DEFINE_RPC_CLNT_EVENT(free); |
| 129 | DEFINE_RPC_CLNT_EVENT(killall); |
| 130 | DEFINE_RPC_CLNT_EVENT(shutdown); |
| 131 | DEFINE_RPC_CLNT_EVENT(release); |
| 132 | DEFINE_RPC_CLNT_EVENT(replace_xprt); |
| 133 | DEFINE_RPC_CLNT_EVENT(replace_xprt_err); |
| 134 | |
| 135 | TRACE_EVENT(rpc_clnt_new, |
| 136 | TP_PROTO( |
| 137 | const struct rpc_clnt *clnt, |
| 138 | const struct rpc_xprt *xprt, |
| 139 | const char *program, |
| 140 | const char *server |
| 141 | ), |
| 142 | |
| 143 | TP_ARGS(clnt, xprt, program, server), |
| 144 | |
| 145 | TP_STRUCT__entry( |
| 146 | __field(unsigned int, client_id) |
| 147 | __string(addr, xprt->address_strings[RPC_DISPLAY_ADDR]) |
| 148 | __string(port, xprt->address_strings[RPC_DISPLAY_PORT]) |
| 149 | __string(program, program) |
| 150 | __string(server, server) |
| 151 | ), |
| 152 | |
| 153 | TP_fast_assign( |
| 154 | __entry->client_id = clnt->cl_clid; |
| 155 | __assign_str(addr, xprt->address_strings[RPC_DISPLAY_ADDR]); |
| 156 | __assign_str(port, xprt->address_strings[RPC_DISPLAY_PORT]); |
Joe Perches | 78c14b3 | 2021-06-12 08:42:27 -0700 | [diff] [blame] | 157 | __assign_str(program, program); |
| 158 | __assign_str(server, server); |
Chuck Lever | 42aad0d | 2020-05-12 17:13:39 -0400 | [diff] [blame] | 159 | ), |
| 160 | |
| 161 | TP_printk("client=%u peer=[%s]:%s program=%s server=%s", |
| 162 | __entry->client_id, __get_str(addr), __get_str(port), |
| 163 | __get_str(program), __get_str(server)) |
| 164 | ); |
| 165 | |
| 166 | TRACE_EVENT(rpc_clnt_new_err, |
| 167 | TP_PROTO( |
| 168 | const char *program, |
| 169 | const char *server, |
| 170 | int error |
| 171 | ), |
| 172 | |
| 173 | TP_ARGS(program, server, error), |
| 174 | |
| 175 | TP_STRUCT__entry( |
| 176 | __field(int, error) |
| 177 | __string(program, program) |
| 178 | __string(server, server) |
| 179 | ), |
| 180 | |
| 181 | TP_fast_assign( |
| 182 | __entry->error = error; |
Joe Perches | 78c14b3 | 2021-06-12 08:42:27 -0700 | [diff] [blame] | 183 | __assign_str(program, program); |
| 184 | __assign_str(server, server); |
Chuck Lever | 42aad0d | 2020-05-12 17:13:39 -0400 | [diff] [blame] | 185 | ), |
| 186 | |
| 187 | TP_printk("program=%s server=%s error=%d", |
| 188 | __get_str(program), __get_str(server), __entry->error) |
| 189 | ); |
| 190 | |
| 191 | TRACE_EVENT(rpc_clnt_clone_err, |
| 192 | TP_PROTO( |
| 193 | const struct rpc_clnt *clnt, |
| 194 | int error |
| 195 | ), |
| 196 | |
| 197 | TP_ARGS(clnt, error), |
| 198 | |
| 199 | TP_STRUCT__entry( |
| 200 | __field(unsigned int, client_id) |
| 201 | __field(int, error) |
| 202 | ), |
| 203 | |
| 204 | TP_fast_assign( |
| 205 | __entry->client_id = clnt->cl_clid; |
| 206 | __entry->error = error; |
| 207 | ), |
| 208 | |
| 209 | TP_printk("client=%u error=%d", __entry->client_id, __entry->error) |
| 210 | ); |
| 211 | |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 212 | |
| 213 | TRACE_DEFINE_ENUM(RPC_AUTH_OK); |
| 214 | TRACE_DEFINE_ENUM(RPC_AUTH_BADCRED); |
| 215 | TRACE_DEFINE_ENUM(RPC_AUTH_REJECTEDCRED); |
| 216 | TRACE_DEFINE_ENUM(RPC_AUTH_BADVERF); |
| 217 | TRACE_DEFINE_ENUM(RPC_AUTH_REJECTEDVERF); |
| 218 | TRACE_DEFINE_ENUM(RPC_AUTH_TOOWEAK); |
| 219 | TRACE_DEFINE_ENUM(RPCSEC_GSS_CREDPROBLEM); |
| 220 | TRACE_DEFINE_ENUM(RPCSEC_GSS_CTXPROBLEM); |
| 221 | |
Steve Dickson | 5753cba | 2012-02-06 10:08:08 -0500 | [diff] [blame] | 222 | #define rpc_show_auth_stat(status) \ |
Chuck Lever | c435da6 | 2017-11-03 13:46:14 -0400 | [diff] [blame] | 223 | __print_symbolic(status, \ |
| 224 | { RPC_AUTH_OK, "AUTH_OK" }, \ |
| 225 | { RPC_AUTH_BADCRED, "BADCRED" }, \ |
| 226 | { RPC_AUTH_REJECTEDCRED, "REJECTEDCRED" }, \ |
| 227 | { RPC_AUTH_BADVERF, "BADVERF" }, \ |
| 228 | { RPC_AUTH_REJECTEDVERF, "REJECTEDVERF" }, \ |
| 229 | { RPC_AUTH_TOOWEAK, "TOOWEAK" }, \ |
| 230 | { RPCSEC_GSS_CREDPROBLEM, "GSS_CREDPROBLEM" }, \ |
| 231 | { RPCSEC_GSS_CTXPROBLEM, "GSS_CTXPROBLEM" }) \ |
| 232 | |
| 233 | DECLARE_EVENT_CLASS(rpc_task_status, |
| 234 | |
| 235 | TP_PROTO(const struct rpc_task *task), |
| 236 | |
| 237 | TP_ARGS(task), |
| 238 | |
| 239 | TP_STRUCT__entry( |
| 240 | __field(unsigned int, task_id) |
| 241 | __field(unsigned int, client_id) |
| 242 | __field(int, status) |
| 243 | ), |
| 244 | |
| 245 | TP_fast_assign( |
| 246 | __entry->task_id = task->tk_pid; |
| 247 | __entry->client_id = task->tk_client->cl_clid; |
| 248 | __entry->status = task->tk_status; |
| 249 | ), |
| 250 | |
| 251 | TP_printk("task:%u@%u status=%d", |
| 252 | __entry->task_id, __entry->client_id, |
Chuck Lever | 6f701383 | 2019-02-11 11:24:00 -0500 | [diff] [blame] | 253 | __entry->status) |
| 254 | ); |
| 255 | #define DEFINE_RPC_STATUS_EVENT(name) \ |
| 256 | DEFINE_EVENT(rpc_task_status, rpc_##name##_status, \ |
| 257 | TP_PROTO( \ |
Chuck Lever | 6f701383 | 2019-02-11 11:24:00 -0500 | [diff] [blame] | 258 | const struct rpc_task *task \ |
| 259 | ), \ |
| 260 | TP_ARGS(task)) |
| 261 | |
| 262 | DEFINE_RPC_STATUS_EVENT(call); |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 263 | DEFINE_RPC_STATUS_EVENT(connect); |
Chuck Lever | 914cdcc | 2020-07-08 16:09:58 -0400 | [diff] [blame] | 264 | DEFINE_RPC_STATUS_EVENT(timeout); |
Chuck Lever | 7c8099f | 2020-07-08 16:10:03 -0400 | [diff] [blame] | 265 | DEFINE_RPC_STATUS_EVENT(retry_refresh); |
| 266 | DEFINE_RPC_STATUS_EVENT(refresh); |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 267 | |
| 268 | TRACE_EVENT(rpc_request, |
| 269 | TP_PROTO(const struct rpc_task *task), |
| 270 | |
| 271 | TP_ARGS(task), |
| 272 | |
| 273 | TP_STRUCT__entry( |
| 274 | __field(unsigned int, task_id) |
| 275 | __field(unsigned int, client_id) |
| 276 | __field(int, version) |
| 277 | __field(bool, async) |
| 278 | __string(progname, task->tk_client->cl_program->name) |
| 279 | __string(procname, rpc_proc_name(task)) |
| 280 | ), |
| 281 | |
| 282 | TP_fast_assign( |
| 283 | __entry->task_id = task->tk_pid; |
| 284 | __entry->client_id = task->tk_client->cl_clid; |
| 285 | __entry->version = task->tk_client->cl_vers; |
| 286 | __entry->async = RPC_IS_ASYNC(task); |
Joe Perches | 78c14b3 | 2021-06-12 08:42:27 -0700 | [diff] [blame] | 287 | __assign_str(progname, task->tk_client->cl_program->name); |
| 288 | __assign_str(procname, rpc_proc_name(task)); |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 289 | ), |
| 290 | |
| 291 | TP_printk("task:%u@%u %sv%d %s (%ssync)", |
| 292 | __entry->task_id, __entry->client_id, |
| 293 | __get_str(progname), __entry->version, |
| 294 | __get_str(procname), __entry->async ? "a": "" |
| 295 | ) |
| 296 | ); |
Chuck Lever | 6f701383 | 2019-02-11 11:24:00 -0500 | [diff] [blame] | 297 | |
Chuck Lever | 6f701383 | 2019-02-11 11:24:00 -0500 | [diff] [blame] | 298 | #define rpc_show_task_flags(flags) \ |
| 299 | __print_flags(flags, "|", \ |
| 300 | { RPC_TASK_ASYNC, "ASYNC" }, \ |
| 301 | { RPC_TASK_SWAPPER, "SWAPPER" }, \ |
Chuck Lever | f9d091c | 2021-07-19 10:48:22 -0400 | [diff] [blame] | 302 | { RPC_TASK_MOVEABLE, "MOVEABLE" }, \ |
Chuck Lever | 7a34c8e | 2020-05-12 17:13:12 -0400 | [diff] [blame] | 303 | { RPC_TASK_NULLCREDS, "NULLCREDS" }, \ |
Chuck Lever | 6f701383 | 2019-02-11 11:24:00 -0500 | [diff] [blame] | 304 | { RPC_CALL_MAJORSEEN, "MAJORSEEN" }, \ |
| 305 | { RPC_TASK_ROOTCREDS, "ROOTCREDS" }, \ |
| 306 | { RPC_TASK_DYNAMIC, "DYNAMIC" }, \ |
Chuck Lever | 7a34c8e | 2020-05-12 17:13:12 -0400 | [diff] [blame] | 307 | { RPC_TASK_NO_ROUND_ROBIN, "NO_ROUND_ROBIN" }, \ |
Chuck Lever | 6f701383 | 2019-02-11 11:24:00 -0500 | [diff] [blame] | 308 | { RPC_TASK_SOFT, "SOFT" }, \ |
| 309 | { RPC_TASK_SOFTCONN, "SOFTCONN" }, \ |
| 310 | { RPC_TASK_SENT, "SENT" }, \ |
| 311 | { RPC_TASK_TIMEOUT, "TIMEOUT" }, \ |
| 312 | { RPC_TASK_NOCONNECT, "NOCONNECT" }, \ |
Chuck Lever | 7a34c8e | 2020-05-12 17:13:12 -0400 | [diff] [blame] | 313 | { RPC_TASK_NO_RETRANS_TIMEOUT, "NORTO" }, \ |
| 314 | { RPC_TASK_CRED_NOREF, "CRED_NOREF" }) |
Chuck Lever | 6f701383 | 2019-02-11 11:24:00 -0500 | [diff] [blame] | 315 | |
Chuck Lever | 6f701383 | 2019-02-11 11:24:00 -0500 | [diff] [blame] | 316 | #define rpc_show_runstate(flags) \ |
| 317 | __print_flags(flags, "|", \ |
| 318 | { (1UL << RPC_TASK_RUNNING), "RUNNING" }, \ |
| 319 | { (1UL << RPC_TASK_QUEUED), "QUEUED" }, \ |
| 320 | { (1UL << RPC_TASK_ACTIVE), "ACTIVE" }, \ |
| 321 | { (1UL << RPC_TASK_NEED_XMIT), "NEED_XMIT" }, \ |
| 322 | { (1UL << RPC_TASK_NEED_RECV), "NEED_RECV" }, \ |
Trond Myklebust | ae67bd3 | 2019-04-07 13:58:44 -0400 | [diff] [blame] | 323 | { (1UL << RPC_TASK_MSG_PIN_WAIT), "MSG_PIN_WAIT" }, \ |
| 324 | { (1UL << RPC_TASK_SIGNALLED), "SIGNALLED" }) |
Chuck Lever | 6f701383 | 2019-02-11 11:24:00 -0500 | [diff] [blame] | 325 | |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 326 | DECLARE_EVENT_CLASS(rpc_task_running, |
| 327 | |
Chuck Lever | e671edb | 2018-03-16 10:33:44 -0400 | [diff] [blame] | 328 | TP_PROTO(const struct rpc_task *task, const void *action), |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 329 | |
Chuck Lever | e671edb | 2018-03-16 10:33:44 -0400 | [diff] [blame] | 330 | TP_ARGS(task, action), |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 331 | |
| 332 | TP_STRUCT__entry( |
Trond Myklebust | 92cb6c5 | 2013-09-04 22:09:50 -0400 | [diff] [blame] | 333 | __field(unsigned int, task_id) |
| 334 | __field(unsigned int, client_id) |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 335 | __field(const void *, action) |
| 336 | __field(unsigned long, runstate) |
| 337 | __field(int, status) |
| 338 | __field(unsigned short, flags) |
| 339 | ), |
| 340 | |
| 341 | TP_fast_assign( |
Chuck Lever | e671edb | 2018-03-16 10:33:44 -0400 | [diff] [blame] | 342 | __entry->client_id = task->tk_client ? |
| 343 | task->tk_client->cl_clid : -1; |
Trond Myklebust | 92cb6c5 | 2013-09-04 22:09:50 -0400 | [diff] [blame] | 344 | __entry->task_id = task->tk_pid; |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 345 | __entry->action = action; |
| 346 | __entry->runstate = task->tk_runstate; |
| 347 | __entry->status = task->tk_status; |
| 348 | __entry->flags = task->tk_flags; |
| 349 | ), |
| 350 | |
Linus Torvalds | 0968621 | 2019-05-07 09:18:12 -0700 | [diff] [blame] | 351 | TP_printk("task:%u@%d flags=%s runstate=%s status=%d action=%ps", |
Trond Myklebust | 92cb6c5 | 2013-09-04 22:09:50 -0400 | [diff] [blame] | 352 | __entry->task_id, __entry->client_id, |
Chuck Lever | 6f701383 | 2019-02-11 11:24:00 -0500 | [diff] [blame] | 353 | rpc_show_task_flags(__entry->flags), |
| 354 | rpc_show_runstate(__entry->runstate), |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 355 | __entry->status, |
| 356 | __entry->action |
| 357 | ) |
| 358 | ); |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 359 | #define DEFINE_RPC_RUNNING_EVENT(name) \ |
| 360 | DEFINE_EVENT(rpc_task_running, rpc_task_##name, \ |
| 361 | TP_PROTO( \ |
| 362 | const struct rpc_task *task, \ |
| 363 | const void *action \ |
| 364 | ), \ |
| 365 | TP_ARGS(task, action)) |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 366 | |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 367 | DEFINE_RPC_RUNNING_EVENT(begin); |
| 368 | DEFINE_RPC_RUNNING_EVENT(run_action); |
Chuck Lever | 1466c22 | 2020-07-08 16:10:45 -0400 | [diff] [blame] | 369 | DEFINE_RPC_RUNNING_EVENT(sync_sleep); |
| 370 | DEFINE_RPC_RUNNING_EVENT(sync_wake); |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 371 | DEFINE_RPC_RUNNING_EVENT(complete); |
Chuck Lever | 721a1d3 | 2020-07-08 16:10:50 -0400 | [diff] [blame] | 372 | DEFINE_RPC_RUNNING_EVENT(timeout); |
Chuck Lever | abf8af7 | 2019-12-23 10:28:28 -0500 | [diff] [blame] | 373 | DEFINE_RPC_RUNNING_EVENT(signalled); |
Chuck Lever | a264aba | 2019-11-20 16:25:52 -0500 | [diff] [blame] | 374 | DEFINE_RPC_RUNNING_EVENT(end); |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 375 | |
| 376 | DECLARE_EVENT_CLASS(rpc_task_queued, |
| 377 | |
Chuck Lever | e671edb | 2018-03-16 10:33:44 -0400 | [diff] [blame] | 378 | TP_PROTO(const struct rpc_task *task, const struct rpc_wait_queue *q), |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 379 | |
Chuck Lever | e671edb | 2018-03-16 10:33:44 -0400 | [diff] [blame] | 380 | TP_ARGS(task, q), |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 381 | |
| 382 | TP_STRUCT__entry( |
Trond Myklebust | 92cb6c5 | 2013-09-04 22:09:50 -0400 | [diff] [blame] | 383 | __field(unsigned int, task_id) |
| 384 | __field(unsigned int, client_id) |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 385 | __field(unsigned long, timeout) |
| 386 | __field(unsigned long, runstate) |
| 387 | __field(int, status) |
| 388 | __field(unsigned short, flags) |
Trond Myklebust | 85c0d24 | 2012-02-06 10:31:35 -0500 | [diff] [blame] | 389 | __string(q_name, rpc_qname(q)) |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 390 | ), |
| 391 | |
| 392 | TP_fast_assign( |
Chuck Lever | e671edb | 2018-03-16 10:33:44 -0400 | [diff] [blame] | 393 | __entry->client_id = task->tk_client ? |
| 394 | task->tk_client->cl_clid : -1; |
Trond Myklebust | 92cb6c5 | 2013-09-04 22:09:50 -0400 | [diff] [blame] | 395 | __entry->task_id = task->tk_pid; |
Trond Myklebust | 5efd187 | 2019-04-07 13:58:50 -0400 | [diff] [blame] | 396 | __entry->timeout = rpc_task_timeout(task); |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 397 | __entry->runstate = task->tk_runstate; |
| 398 | __entry->status = task->tk_status; |
| 399 | __entry->flags = task->tk_flags; |
Trond Myklebust | 85c0d24 | 2012-02-06 10:31:35 -0500 | [diff] [blame] | 400 | __assign_str(q_name, rpc_qname(q)); |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 401 | ), |
| 402 | |
Chuck Lever | 6f701383 | 2019-02-11 11:24:00 -0500 | [diff] [blame] | 403 | TP_printk("task:%u@%d flags=%s runstate=%s status=%d timeout=%lu queue=%s", |
Trond Myklebust | 92cb6c5 | 2013-09-04 22:09:50 -0400 | [diff] [blame] | 404 | __entry->task_id, __entry->client_id, |
Chuck Lever | 6f701383 | 2019-02-11 11:24:00 -0500 | [diff] [blame] | 405 | rpc_show_task_flags(__entry->flags), |
| 406 | rpc_show_runstate(__entry->runstate), |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 407 | __entry->status, |
| 408 | __entry->timeout, |
Trond Myklebust | 85c0d24 | 2012-02-06 10:31:35 -0500 | [diff] [blame] | 409 | __get_str(q_name) |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 410 | ) |
| 411 | ); |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 412 | #define DEFINE_RPC_QUEUED_EVENT(name) \ |
| 413 | DEFINE_EVENT(rpc_task_queued, rpc_task_##name, \ |
| 414 | TP_PROTO( \ |
| 415 | const struct rpc_task *task, \ |
| 416 | const struct rpc_wait_queue *q \ |
| 417 | ), \ |
| 418 | TP_ARGS(task, q)) |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 419 | |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 420 | DEFINE_RPC_QUEUED_EVENT(sleep); |
| 421 | DEFINE_RPC_QUEUED_EVENT(wakeup); |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 422 | |
Chuck Lever | e8680a2 | 2019-02-11 11:24:48 -0500 | [diff] [blame] | 423 | DECLARE_EVENT_CLASS(rpc_failure, |
| 424 | |
| 425 | TP_PROTO(const struct rpc_task *task), |
| 426 | |
| 427 | TP_ARGS(task), |
| 428 | |
| 429 | TP_STRUCT__entry( |
| 430 | __field(unsigned int, task_id) |
| 431 | __field(unsigned int, client_id) |
| 432 | ), |
| 433 | |
| 434 | TP_fast_assign( |
| 435 | __entry->task_id = task->tk_pid; |
| 436 | __entry->client_id = task->tk_client->cl_clid; |
| 437 | ), |
| 438 | |
| 439 | TP_printk("task:%u@%u", |
| 440 | __entry->task_id, __entry->client_id) |
| 441 | ); |
| 442 | |
| 443 | #define DEFINE_RPC_FAILURE(name) \ |
| 444 | DEFINE_EVENT(rpc_failure, rpc_bad_##name, \ |
| 445 | TP_PROTO( \ |
| 446 | const struct rpc_task *task \ |
| 447 | ), \ |
| 448 | TP_ARGS(task)) |
| 449 | |
| 450 | DEFINE_RPC_FAILURE(callhdr); |
Chuck Lever | 7f5667a | 2019-02-11 11:24:53 -0500 | [diff] [blame] | 451 | DEFINE_RPC_FAILURE(verifier); |
| 452 | |
| 453 | DECLARE_EVENT_CLASS(rpc_reply_event, |
| 454 | |
| 455 | TP_PROTO( |
| 456 | const struct rpc_task *task |
| 457 | ), |
| 458 | |
| 459 | TP_ARGS(task), |
| 460 | |
| 461 | TP_STRUCT__entry( |
| 462 | __field(unsigned int, task_id) |
| 463 | __field(unsigned int, client_id) |
| 464 | __field(u32, xid) |
| 465 | __string(progname, task->tk_client->cl_program->name) |
| 466 | __field(u32, version) |
| 467 | __string(procname, rpc_proc_name(task)) |
| 468 | __string(servername, task->tk_xprt->servername) |
| 469 | ), |
| 470 | |
| 471 | TP_fast_assign( |
| 472 | __entry->task_id = task->tk_pid; |
| 473 | __entry->client_id = task->tk_client->cl_clid; |
| 474 | __entry->xid = be32_to_cpu(task->tk_rqstp->rq_xid); |
Joe Perches | 78c14b3 | 2021-06-12 08:42:27 -0700 | [diff] [blame] | 475 | __assign_str(progname, task->tk_client->cl_program->name); |
Chuck Lever | 7f5667a | 2019-02-11 11:24:53 -0500 | [diff] [blame] | 476 | __entry->version = task->tk_client->cl_vers; |
Joe Perches | 78c14b3 | 2021-06-12 08:42:27 -0700 | [diff] [blame] | 477 | __assign_str(procname, rpc_proc_name(task)); |
| 478 | __assign_str(servername, task->tk_xprt->servername); |
Chuck Lever | 7f5667a | 2019-02-11 11:24:53 -0500 | [diff] [blame] | 479 | ), |
| 480 | |
| 481 | TP_printk("task:%u@%d server=%s xid=0x%08x %sv%d %s", |
| 482 | __entry->task_id, __entry->client_id, __get_str(servername), |
| 483 | __entry->xid, __get_str(progname), __entry->version, |
| 484 | __get_str(procname)) |
| 485 | ) |
| 486 | |
| 487 | #define DEFINE_RPC_REPLY_EVENT(name) \ |
| 488 | DEFINE_EVENT(rpc_reply_event, rpc__##name, \ |
| 489 | TP_PROTO( \ |
| 490 | const struct rpc_task *task \ |
| 491 | ), \ |
| 492 | TP_ARGS(task)) |
| 493 | |
| 494 | DEFINE_RPC_REPLY_EVENT(prog_unavail); |
| 495 | DEFINE_RPC_REPLY_EVENT(prog_mismatch); |
| 496 | DEFINE_RPC_REPLY_EVENT(proc_unavail); |
| 497 | DEFINE_RPC_REPLY_EVENT(garbage_args); |
| 498 | DEFINE_RPC_REPLY_EVENT(unparsable); |
| 499 | DEFINE_RPC_REPLY_EVENT(mismatch); |
| 500 | DEFINE_RPC_REPLY_EVENT(stale_creds); |
| 501 | DEFINE_RPC_REPLY_EVENT(bad_creds); |
| 502 | DEFINE_RPC_REPLY_EVENT(auth_tooweak); |
Chuck Lever | e8680a2 | 2019-02-11 11:24:48 -0500 | [diff] [blame] | 503 | |
Chuck Lever | 42ebfc2 | 2020-07-08 16:10:14 -0400 | [diff] [blame] | 504 | #define DEFINE_RPCB_ERROR_EVENT(name) \ |
| 505 | DEFINE_EVENT(rpc_reply_event, rpcb_##name##_err, \ |
| 506 | TP_PROTO( \ |
| 507 | const struct rpc_task *task \ |
| 508 | ), \ |
| 509 | TP_ARGS(task)) |
| 510 | |
| 511 | DEFINE_RPCB_ERROR_EVENT(prog_unavail); |
| 512 | DEFINE_RPCB_ERROR_EVENT(timeout); |
| 513 | DEFINE_RPCB_ERROR_EVENT(bind_version); |
| 514 | DEFINE_RPCB_ERROR_EVENT(unreachable); |
| 515 | DEFINE_RPCB_ERROR_EVENT(unrecognized); |
| 516 | |
Chuck Lever | 06e234c | 2020-07-08 16:09:11 -0400 | [diff] [blame] | 517 | TRACE_EVENT(rpc_buf_alloc, |
| 518 | TP_PROTO( |
| 519 | const struct rpc_task *task, |
| 520 | int status |
| 521 | ), |
| 522 | |
| 523 | TP_ARGS(task, status), |
| 524 | |
| 525 | TP_STRUCT__entry( |
| 526 | __field(unsigned int, task_id) |
| 527 | __field(unsigned int, client_id) |
| 528 | __field(size_t, callsize) |
| 529 | __field(size_t, recvsize) |
| 530 | __field(int, status) |
| 531 | ), |
| 532 | |
| 533 | TP_fast_assign( |
| 534 | __entry->task_id = task->tk_pid; |
| 535 | __entry->client_id = task->tk_client->cl_clid; |
| 536 | __entry->callsize = task->tk_rqstp->rq_callsize; |
| 537 | __entry->recvsize = task->tk_rqstp->rq_rcvsize; |
| 538 | __entry->status = status; |
| 539 | ), |
| 540 | |
| 541 | TP_printk("task:%u@%u callsize=%zu recvsize=%zu status=%d", |
| 542 | __entry->task_id, __entry->client_id, |
| 543 | __entry->callsize, __entry->recvsize, __entry->status |
| 544 | ) |
| 545 | ); |
| 546 | |
Chuck Lever | 0125ecb | 2020-05-12 17:13:23 -0400 | [diff] [blame] | 547 | TRACE_EVENT(rpc_call_rpcerror, |
| 548 | TP_PROTO( |
| 549 | const struct rpc_task *task, |
| 550 | int tk_status, |
| 551 | int rpc_status |
| 552 | ), |
| 553 | |
| 554 | TP_ARGS(task, tk_status, rpc_status), |
| 555 | |
| 556 | TP_STRUCT__entry( |
| 557 | __field(unsigned int, task_id) |
| 558 | __field(unsigned int, client_id) |
| 559 | __field(int, tk_status) |
| 560 | __field(int, rpc_status) |
| 561 | ), |
| 562 | |
| 563 | TP_fast_assign( |
| 564 | __entry->client_id = task->tk_client->cl_clid; |
| 565 | __entry->task_id = task->tk_pid; |
| 566 | __entry->tk_status = tk_status; |
| 567 | __entry->rpc_status = rpc_status; |
| 568 | ), |
| 569 | |
| 570 | TP_printk("task:%u@%u tk_status=%d rpc_status=%d", |
| 571 | __entry->task_id, __entry->client_id, |
| 572 | __entry->tk_status, __entry->rpc_status) |
| 573 | ); |
| 574 | |
Chuck Lever | 40bf7eb | 2018-03-16 10:33:49 -0400 | [diff] [blame] | 575 | TRACE_EVENT(rpc_stats_latency, |
| 576 | |
| 577 | TP_PROTO( |
| 578 | const struct rpc_task *task, |
| 579 | ktime_t backlog, |
| 580 | ktime_t rtt, |
| 581 | ktime_t execute |
| 582 | ), |
| 583 | |
| 584 | TP_ARGS(task, backlog, rtt, execute), |
| 585 | |
| 586 | TP_STRUCT__entry( |
Chuck Lever | 98eb6cf | 2018-05-01 11:37:19 -0400 | [diff] [blame] | 587 | __field(unsigned int, task_id) |
| 588 | __field(unsigned int, client_id) |
Chuck Lever | 40bf7eb | 2018-03-16 10:33:49 -0400 | [diff] [blame] | 589 | __field(u32, xid) |
| 590 | __field(int, version) |
| 591 | __string(progname, task->tk_client->cl_program->name) |
| 592 | __string(procname, rpc_proc_name(task)) |
| 593 | __field(unsigned long, backlog) |
| 594 | __field(unsigned long, rtt) |
| 595 | __field(unsigned long, execute) |
Chuck Lever | 40bf7eb | 2018-03-16 10:33:49 -0400 | [diff] [blame] | 596 | ), |
| 597 | |
| 598 | TP_fast_assign( |
Chuck Lever | 98eb6cf | 2018-05-01 11:37:19 -0400 | [diff] [blame] | 599 | __entry->client_id = task->tk_client->cl_clid; |
| 600 | __entry->task_id = task->tk_pid; |
Chuck Lever | 40bf7eb | 2018-03-16 10:33:49 -0400 | [diff] [blame] | 601 | __entry->xid = be32_to_cpu(task->tk_rqstp->rq_xid); |
| 602 | __entry->version = task->tk_client->cl_vers; |
Joe Perches | 78c14b3 | 2021-06-12 08:42:27 -0700 | [diff] [blame] | 603 | __assign_str(progname, task->tk_client->cl_program->name); |
| 604 | __assign_str(procname, rpc_proc_name(task)); |
Chuck Lever | 40bf7eb | 2018-03-16 10:33:49 -0400 | [diff] [blame] | 605 | __entry->backlog = ktime_to_us(backlog); |
| 606 | __entry->rtt = ktime_to_us(rtt); |
| 607 | __entry->execute = ktime_to_us(execute); |
Chuck Lever | 40bf7eb | 2018-03-16 10:33:49 -0400 | [diff] [blame] | 608 | ), |
| 609 | |
Chuck Lever | 98eb6cf | 2018-05-01 11:37:19 -0400 | [diff] [blame] | 610 | TP_printk("task:%u@%d xid=0x%08x %sv%d %s backlog=%lu rtt=%lu execute=%lu", |
| 611 | __entry->task_id, __entry->client_id, __entry->xid, |
Chuck Lever | 40bf7eb | 2018-03-16 10:33:49 -0400 | [diff] [blame] | 612 | __get_str(progname), __entry->version, __get_str(procname), |
| 613 | __entry->backlog, __entry->rtt, __entry->execute) |
| 614 | ); |
| 615 | |
Chuck Lever | 5582863 | 2019-02-11 11:24:10 -0500 | [diff] [blame] | 616 | TRACE_EVENT(rpc_xdr_overflow, |
| 617 | TP_PROTO( |
| 618 | const struct xdr_stream *xdr, |
| 619 | size_t requested |
| 620 | ), |
| 621 | |
| 622 | TP_ARGS(xdr, requested), |
| 623 | |
| 624 | TP_STRUCT__entry( |
| 625 | __field(unsigned int, task_id) |
| 626 | __field(unsigned int, client_id) |
| 627 | __field(int, version) |
| 628 | __field(size_t, requested) |
| 629 | __field(const void *, end) |
| 630 | __field(const void *, p) |
| 631 | __field(const void *, head_base) |
| 632 | __field(size_t, head_len) |
| 633 | __field(const void *, tail_base) |
| 634 | __field(size_t, tail_len) |
| 635 | __field(unsigned int, page_len) |
| 636 | __field(unsigned int, len) |
Chuck Lever | d321ff5 | 2020-10-23 10:41:07 -0400 | [diff] [blame] | 637 | __string(progname, xdr->rqst ? |
| 638 | xdr->rqst->rq_task->tk_client->cl_program->name : "unknown") |
| 639 | __string(procedure, xdr->rqst ? |
| 640 | xdr->rqst->rq_task->tk_msg.rpc_proc->p_name : "unknown") |
Chuck Lever | 5582863 | 2019-02-11 11:24:10 -0500 | [diff] [blame] | 641 | ), |
| 642 | |
| 643 | TP_fast_assign( |
| 644 | if (xdr->rqst) { |
| 645 | const struct rpc_task *task = xdr->rqst->rq_task; |
| 646 | |
| 647 | __entry->task_id = task->tk_pid; |
| 648 | __entry->client_id = task->tk_client->cl_clid; |
| 649 | __assign_str(progname, |
Joe Perches | 78c14b3 | 2021-06-12 08:42:27 -0700 | [diff] [blame] | 650 | task->tk_client->cl_program->name); |
Chuck Lever | 5582863 | 2019-02-11 11:24:10 -0500 | [diff] [blame] | 651 | __entry->version = task->tk_client->cl_vers; |
Joe Perches | 78c14b3 | 2021-06-12 08:42:27 -0700 | [diff] [blame] | 652 | __assign_str(procedure, task->tk_msg.rpc_proc->p_name); |
Chuck Lever | 5582863 | 2019-02-11 11:24:10 -0500 | [diff] [blame] | 653 | } else { |
| 654 | __entry->task_id = 0; |
| 655 | __entry->client_id = 0; |
Joe Perches | 78c14b3 | 2021-06-12 08:42:27 -0700 | [diff] [blame] | 656 | __assign_str(progname, "unknown"); |
Chuck Lever | 5582863 | 2019-02-11 11:24:10 -0500 | [diff] [blame] | 657 | __entry->version = 0; |
Joe Perches | 78c14b3 | 2021-06-12 08:42:27 -0700 | [diff] [blame] | 658 | __assign_str(procedure, "unknown"); |
Chuck Lever | 5582863 | 2019-02-11 11:24:10 -0500 | [diff] [blame] | 659 | } |
| 660 | __entry->requested = requested; |
| 661 | __entry->end = xdr->end; |
| 662 | __entry->p = xdr->p; |
| 663 | __entry->head_base = xdr->buf->head[0].iov_base, |
| 664 | __entry->head_len = xdr->buf->head[0].iov_len, |
| 665 | __entry->page_len = xdr->buf->page_len, |
| 666 | __entry->tail_base = xdr->buf->tail[0].iov_base, |
| 667 | __entry->tail_len = xdr->buf->tail[0].iov_len, |
| 668 | __entry->len = xdr->buf->len; |
| 669 | ), |
| 670 | |
| 671 | TP_printk( |
| 672 | "task:%u@%u %sv%d %s requested=%zu p=%p end=%p xdr=[%p,%zu]/%u/[%p,%zu]/%u\n", |
| 673 | __entry->task_id, __entry->client_id, |
| 674 | __get_str(progname), __entry->version, __get_str(procedure), |
| 675 | __entry->requested, __entry->p, __entry->end, |
| 676 | __entry->head_base, __entry->head_len, |
| 677 | __entry->page_len, |
| 678 | __entry->tail_base, __entry->tail_len, |
| 679 | __entry->len |
| 680 | ) |
| 681 | ); |
| 682 | |
Chuck Lever | 7be9cea3 | 2019-02-11 11:24:16 -0500 | [diff] [blame] | 683 | TRACE_EVENT(rpc_xdr_alignment, |
| 684 | TP_PROTO( |
| 685 | const struct xdr_stream *xdr, |
| 686 | size_t offset, |
| 687 | unsigned int copied |
| 688 | ), |
| 689 | |
| 690 | TP_ARGS(xdr, offset, copied), |
| 691 | |
| 692 | TP_STRUCT__entry( |
| 693 | __field(unsigned int, task_id) |
| 694 | __field(unsigned int, client_id) |
| 695 | __field(int, version) |
| 696 | __field(size_t, offset) |
| 697 | __field(unsigned int, copied) |
| 698 | __field(const void *, head_base) |
| 699 | __field(size_t, head_len) |
| 700 | __field(const void *, tail_base) |
| 701 | __field(size_t, tail_len) |
| 702 | __field(unsigned int, page_len) |
| 703 | __field(unsigned int, len) |
| 704 | __string(progname, |
| 705 | xdr->rqst->rq_task->tk_client->cl_program->name) |
| 706 | __string(procedure, |
| 707 | xdr->rqst->rq_task->tk_msg.rpc_proc->p_name) |
| 708 | ), |
| 709 | |
| 710 | TP_fast_assign( |
| 711 | const struct rpc_task *task = xdr->rqst->rq_task; |
| 712 | |
| 713 | __entry->task_id = task->tk_pid; |
| 714 | __entry->client_id = task->tk_client->cl_clid; |
| 715 | __assign_str(progname, |
Joe Perches | 78c14b3 | 2021-06-12 08:42:27 -0700 | [diff] [blame] | 716 | task->tk_client->cl_program->name); |
Chuck Lever | 7be9cea3 | 2019-02-11 11:24:16 -0500 | [diff] [blame] | 717 | __entry->version = task->tk_client->cl_vers; |
Joe Perches | 78c14b3 | 2021-06-12 08:42:27 -0700 | [diff] [blame] | 718 | __assign_str(procedure, task->tk_msg.rpc_proc->p_name); |
Chuck Lever | 7be9cea3 | 2019-02-11 11:24:16 -0500 | [diff] [blame] | 719 | |
| 720 | __entry->offset = offset; |
| 721 | __entry->copied = copied; |
| 722 | __entry->head_base = xdr->buf->head[0].iov_base, |
| 723 | __entry->head_len = xdr->buf->head[0].iov_len, |
| 724 | __entry->page_len = xdr->buf->page_len, |
| 725 | __entry->tail_base = xdr->buf->tail[0].iov_base, |
| 726 | __entry->tail_len = xdr->buf->tail[0].iov_len, |
| 727 | __entry->len = xdr->buf->len; |
| 728 | ), |
| 729 | |
| 730 | TP_printk( |
| 731 | "task:%u@%u %sv%d %s offset=%zu copied=%u xdr=[%p,%zu]/%u/[%p,%zu]/%u\n", |
| 732 | __entry->task_id, __entry->client_id, |
| 733 | __get_str(progname), __entry->version, __get_str(procedure), |
| 734 | __entry->offset, __entry->copied, |
| 735 | __entry->head_base, __entry->head_len, |
| 736 | __entry->page_len, |
| 737 | __entry->tail_base, __entry->tail_len, |
| 738 | __entry->len |
| 739 | ) |
| 740 | ); |
| 741 | |
Steven Rostedt (Red Hat) | 6ba16ee | 2015-03-27 16:53:03 -0400 | [diff] [blame] | 742 | /* |
| 743 | * First define the enums in the below macros to be exported to userspace |
| 744 | * via TRACE_DEFINE_ENUM(). |
| 745 | */ |
| 746 | #undef EM |
| 747 | #undef EMe |
| 748 | #define EM(a, b) TRACE_DEFINE_ENUM(a); |
| 749 | #define EMe(a, b) TRACE_DEFINE_ENUM(a); |
| 750 | |
| 751 | #define RPC_SHOW_SOCKET \ |
| 752 | EM( SS_FREE, "FREE" ) \ |
| 753 | EM( SS_UNCONNECTED, "UNCONNECTED" ) \ |
Chuck Lever | 82909dc | 2020-05-12 17:13:18 -0400 | [diff] [blame] | 754 | EM( SS_CONNECTING, "CONNECTING" ) \ |
| 755 | EM( SS_CONNECTED, "CONNECTED" ) \ |
| 756 | EMe( SS_DISCONNECTING, "DISCONNECTING" ) |
Steven Rostedt (Red Hat) | 6ba16ee | 2015-03-27 16:53:03 -0400 | [diff] [blame] | 757 | |
Trond Myklebust | 40b5ea0 | 2013-09-04 12:16:23 -0400 | [diff] [blame] | 758 | #define rpc_show_socket_state(state) \ |
Steven Rostedt (Red Hat) | 6ba16ee | 2015-03-27 16:53:03 -0400 | [diff] [blame] | 759 | __print_symbolic(state, RPC_SHOW_SOCKET) |
| 760 | |
| 761 | RPC_SHOW_SOCKET |
| 762 | |
| 763 | #define RPC_SHOW_SOCK \ |
| 764 | EM( TCP_ESTABLISHED, "ESTABLISHED" ) \ |
| 765 | EM( TCP_SYN_SENT, "SYN_SENT" ) \ |
| 766 | EM( TCP_SYN_RECV, "SYN_RECV" ) \ |
| 767 | EM( TCP_FIN_WAIT1, "FIN_WAIT1" ) \ |
| 768 | EM( TCP_FIN_WAIT2, "FIN_WAIT2" ) \ |
| 769 | EM( TCP_TIME_WAIT, "TIME_WAIT" ) \ |
| 770 | EM( TCP_CLOSE, "CLOSE" ) \ |
| 771 | EM( TCP_CLOSE_WAIT, "CLOSE_WAIT" ) \ |
| 772 | EM( TCP_LAST_ACK, "LAST_ACK" ) \ |
| 773 | EM( TCP_LISTEN, "LISTEN" ) \ |
| 774 | EMe( TCP_CLOSING, "CLOSING" ) |
Trond Myklebust | 40b5ea0 | 2013-09-04 12:16:23 -0400 | [diff] [blame] | 775 | |
| 776 | #define rpc_show_sock_state(state) \ |
Steven Rostedt (Red Hat) | 6ba16ee | 2015-03-27 16:53:03 -0400 | [diff] [blame] | 777 | __print_symbolic(state, RPC_SHOW_SOCK) |
| 778 | |
| 779 | RPC_SHOW_SOCK |
| 780 | |
| 781 | /* |
| 782 | * Now redefine the EM() and EMe() macros to map the enums to the strings |
| 783 | * that will be printed in the output. |
| 784 | */ |
| 785 | #undef EM |
| 786 | #undef EMe |
| 787 | #define EM(a, b) {a, b}, |
| 788 | #define EMe(a, b) {a, b} |
Trond Myklebust | 40b5ea0 | 2013-09-04 12:16:23 -0400 | [diff] [blame] | 789 | |
| 790 | DECLARE_EVENT_CLASS(xs_socket_event, |
| 791 | |
| 792 | TP_PROTO( |
| 793 | struct rpc_xprt *xprt, |
| 794 | struct socket *socket |
| 795 | ), |
| 796 | |
| 797 | TP_ARGS(xprt, socket), |
| 798 | |
| 799 | TP_STRUCT__entry( |
| 800 | __field(unsigned int, socket_state) |
| 801 | __field(unsigned int, sock_state) |
| 802 | __field(unsigned long long, ino) |
| 803 | __string(dstaddr, |
| 804 | xprt->address_strings[RPC_DISPLAY_ADDR]) |
| 805 | __string(dstport, |
| 806 | xprt->address_strings[RPC_DISPLAY_PORT]) |
| 807 | ), |
| 808 | |
| 809 | TP_fast_assign( |
| 810 | struct inode *inode = SOCK_INODE(socket); |
| 811 | __entry->socket_state = socket->state; |
| 812 | __entry->sock_state = socket->sk->sk_state; |
| 813 | __entry->ino = (unsigned long long)inode->i_ino; |
| 814 | __assign_str(dstaddr, |
| 815 | xprt->address_strings[RPC_DISPLAY_ADDR]); |
| 816 | __assign_str(dstport, |
| 817 | xprt->address_strings[RPC_DISPLAY_PORT]); |
| 818 | ), |
| 819 | |
| 820 | TP_printk( |
| 821 | "socket:[%llu] dstaddr=%s/%s " |
| 822 | "state=%u (%s) sk_state=%u (%s)", |
| 823 | __entry->ino, __get_str(dstaddr), __get_str(dstport), |
| 824 | __entry->socket_state, |
| 825 | rpc_show_socket_state(__entry->socket_state), |
| 826 | __entry->sock_state, |
| 827 | rpc_show_sock_state(__entry->sock_state) |
| 828 | ) |
| 829 | ); |
| 830 | #define DEFINE_RPC_SOCKET_EVENT(name) \ |
| 831 | DEFINE_EVENT(xs_socket_event, name, \ |
| 832 | TP_PROTO( \ |
| 833 | struct rpc_xprt *xprt, \ |
| 834 | struct socket *socket \ |
| 835 | ), \ |
| 836 | TP_ARGS(xprt, socket)) |
| 837 | |
| 838 | DECLARE_EVENT_CLASS(xs_socket_event_done, |
| 839 | |
| 840 | TP_PROTO( |
| 841 | struct rpc_xprt *xprt, |
| 842 | struct socket *socket, |
| 843 | int error |
| 844 | ), |
| 845 | |
| 846 | TP_ARGS(xprt, socket, error), |
| 847 | |
| 848 | TP_STRUCT__entry( |
| 849 | __field(int, error) |
| 850 | __field(unsigned int, socket_state) |
| 851 | __field(unsigned int, sock_state) |
| 852 | __field(unsigned long long, ino) |
| 853 | __string(dstaddr, |
| 854 | xprt->address_strings[RPC_DISPLAY_ADDR]) |
| 855 | __string(dstport, |
| 856 | xprt->address_strings[RPC_DISPLAY_PORT]) |
| 857 | ), |
| 858 | |
| 859 | TP_fast_assign( |
| 860 | struct inode *inode = SOCK_INODE(socket); |
| 861 | __entry->socket_state = socket->state; |
| 862 | __entry->sock_state = socket->sk->sk_state; |
| 863 | __entry->ino = (unsigned long long)inode->i_ino; |
| 864 | __entry->error = error; |
| 865 | __assign_str(dstaddr, |
| 866 | xprt->address_strings[RPC_DISPLAY_ADDR]); |
| 867 | __assign_str(dstport, |
| 868 | xprt->address_strings[RPC_DISPLAY_PORT]); |
| 869 | ), |
| 870 | |
| 871 | TP_printk( |
| 872 | "error=%d socket:[%llu] dstaddr=%s/%s " |
| 873 | "state=%u (%s) sk_state=%u (%s)", |
| 874 | __entry->error, |
| 875 | __entry->ino, __get_str(dstaddr), __get_str(dstport), |
| 876 | __entry->socket_state, |
| 877 | rpc_show_socket_state(__entry->socket_state), |
| 878 | __entry->sock_state, |
| 879 | rpc_show_sock_state(__entry->sock_state) |
| 880 | ) |
| 881 | ); |
| 882 | #define DEFINE_RPC_SOCKET_EVENT_DONE(name) \ |
| 883 | DEFINE_EVENT(xs_socket_event_done, name, \ |
| 884 | TP_PROTO( \ |
| 885 | struct rpc_xprt *xprt, \ |
| 886 | struct socket *socket, \ |
| 887 | int error \ |
| 888 | ), \ |
| 889 | TP_ARGS(xprt, socket, error)) |
| 890 | |
| 891 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_state_change); |
| 892 | DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_connect); |
Trond Myklebust | e8353c76 | 2013-12-31 13:39:22 -0500 | [diff] [blame] | 893 | DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_error); |
Trond Myklebust | 40b5ea0 | 2013-09-04 12:16:23 -0400 | [diff] [blame] | 894 | DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_reset_connection); |
| 895 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_close); |
| 896 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_shutdown); |
| 897 | |
Chuck Lever | 015747d | 2020-07-08 16:09:32 -0400 | [diff] [blame] | 898 | TRACE_EVENT(rpc_socket_nospace, |
| 899 | TP_PROTO( |
| 900 | const struct rpc_rqst *rqst, |
| 901 | const struct sock_xprt *transport |
| 902 | ), |
| 903 | |
| 904 | TP_ARGS(rqst, transport), |
| 905 | |
| 906 | TP_STRUCT__entry( |
| 907 | __field(unsigned int, task_id) |
| 908 | __field(unsigned int, client_id) |
| 909 | __field(unsigned int, total) |
| 910 | __field(unsigned int, remaining) |
| 911 | ), |
| 912 | |
| 913 | TP_fast_assign( |
| 914 | __entry->task_id = rqst->rq_task->tk_pid; |
| 915 | __entry->client_id = rqst->rq_task->tk_client->cl_clid; |
| 916 | __entry->total = rqst->rq_slen; |
| 917 | __entry->remaining = rqst->rq_slen - transport->xmit.offset; |
| 918 | ), |
| 919 | |
| 920 | TP_printk("task:%u@%u total=%u remaining=%u", |
| 921 | __entry->task_id, __entry->client_id, |
| 922 | __entry->total, __entry->remaining |
| 923 | ) |
| 924 | ); |
| 925 | |
Chuck Lever | 94afd9c | 2020-05-18 10:13:02 -0400 | [diff] [blame] | 926 | #define rpc_show_xprt_state(x) \ |
| 927 | __print_flags(x, "|", \ |
| 928 | { (1UL << XPRT_LOCKED), "LOCKED"}, \ |
| 929 | { (1UL << XPRT_CONNECTED), "CONNECTED"}, \ |
| 930 | { (1UL << XPRT_CONNECTING), "CONNECTING"}, \ |
| 931 | { (1UL << XPRT_CLOSE_WAIT), "CLOSE_WAIT"}, \ |
| 932 | { (1UL << XPRT_BOUND), "BOUND"}, \ |
| 933 | { (1UL << XPRT_BINDING), "BINDING"}, \ |
| 934 | { (1UL << XPRT_CLOSING), "CLOSING"}, \ |
Chuck Lever | f9d091c | 2021-07-19 10:48:22 -0400 | [diff] [blame] | 935 | { (1UL << XPRT_OFFLINE), "OFFLINE"}, \ |
| 936 | { (1UL << XPRT_REMOVE), "REMOVE"}, \ |
Chuck Lever | 94afd9c | 2020-05-18 10:13:02 -0400 | [diff] [blame] | 937 | { (1UL << XPRT_CONGESTED), "CONGESTED"}, \ |
| 938 | { (1UL << XPRT_CWND_WAIT), "CWND_WAIT"}, \ |
| 939 | { (1UL << XPRT_WRITE_SPACE), "WRITE_SPACE"}) |
| 940 | |
Chuck Lever | 911813d | 2020-05-12 17:13:34 -0400 | [diff] [blame] | 941 | DECLARE_EVENT_CLASS(rpc_xprt_lifetime_class, |
| 942 | TP_PROTO( |
| 943 | const struct rpc_xprt *xprt |
| 944 | ), |
| 945 | |
| 946 | TP_ARGS(xprt), |
| 947 | |
| 948 | TP_STRUCT__entry( |
Chuck Lever | 94afd9c | 2020-05-18 10:13:02 -0400 | [diff] [blame] | 949 | __field(unsigned long, state) |
Chuck Lever | 911813d | 2020-05-12 17:13:34 -0400 | [diff] [blame] | 950 | __string(addr, xprt->address_strings[RPC_DISPLAY_ADDR]) |
| 951 | __string(port, xprt->address_strings[RPC_DISPLAY_PORT]) |
| 952 | ), |
| 953 | |
| 954 | TP_fast_assign( |
Chuck Lever | 94afd9c | 2020-05-18 10:13:02 -0400 | [diff] [blame] | 955 | __entry->state = xprt->state; |
Chuck Lever | 911813d | 2020-05-12 17:13:34 -0400 | [diff] [blame] | 956 | __assign_str(addr, xprt->address_strings[RPC_DISPLAY_ADDR]); |
| 957 | __assign_str(port, xprt->address_strings[RPC_DISPLAY_PORT]); |
| 958 | ), |
| 959 | |
Chuck Lever | 94afd9c | 2020-05-18 10:13:02 -0400 | [diff] [blame] | 960 | TP_printk("peer=[%s]:%s state=%s", |
| 961 | __get_str(addr), __get_str(port), |
| 962 | rpc_show_xprt_state(__entry->state)) |
Chuck Lever | 911813d | 2020-05-12 17:13:34 -0400 | [diff] [blame] | 963 | ); |
| 964 | |
| 965 | #define DEFINE_RPC_XPRT_LIFETIME_EVENT(name) \ |
| 966 | DEFINE_EVENT(rpc_xprt_lifetime_class, \ |
| 967 | xprt_##name, \ |
| 968 | TP_PROTO( \ |
| 969 | const struct rpc_xprt *xprt \ |
| 970 | ), \ |
| 971 | TP_ARGS(xprt)) |
| 972 | |
| 973 | DEFINE_RPC_XPRT_LIFETIME_EVENT(create); |
Chuck Lever | db0a86c | 2020-07-08 16:09:47 -0400 | [diff] [blame] | 974 | DEFINE_RPC_XPRT_LIFETIME_EVENT(connect); |
Chuck Lever | 911813d | 2020-05-12 17:13:34 -0400 | [diff] [blame] | 975 | DEFINE_RPC_XPRT_LIFETIME_EVENT(disconnect_auto); |
| 976 | DEFINE_RPC_XPRT_LIFETIME_EVENT(disconnect_done); |
| 977 | DEFINE_RPC_XPRT_LIFETIME_EVENT(disconnect_force); |
| 978 | DEFINE_RPC_XPRT_LIFETIME_EVENT(disconnect_cleanup); |
| 979 | DEFINE_RPC_XPRT_LIFETIME_EVENT(destroy); |
| 980 | |
Jeff Layton | 3705ad6 | 2014-10-28 14:24:13 -0400 | [diff] [blame] | 981 | DECLARE_EVENT_CLASS(rpc_xprt_event, |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 982 | TP_PROTO( |
| 983 | const struct rpc_xprt *xprt, |
| 984 | __be32 xid, |
| 985 | int status |
| 986 | ), |
Jeff Layton | 3705ad6 | 2014-10-28 14:24:13 -0400 | [diff] [blame] | 987 | |
| 988 | TP_ARGS(xprt, xid, status), |
| 989 | |
| 990 | TP_STRUCT__entry( |
Chuck Lever | a30ccf1 | 2017-10-20 10:35:18 -0400 | [diff] [blame] | 991 | __field(u32, xid) |
Jeff Layton | 3705ad6 | 2014-10-28 14:24:13 -0400 | [diff] [blame] | 992 | __field(int, status) |
| 993 | __string(addr, xprt->address_strings[RPC_DISPLAY_ADDR]) |
| 994 | __string(port, xprt->address_strings[RPC_DISPLAY_PORT]) |
| 995 | ), |
| 996 | |
| 997 | TP_fast_assign( |
Chuck Lever | a30ccf1 | 2017-10-20 10:35:18 -0400 | [diff] [blame] | 998 | __entry->xid = be32_to_cpu(xid); |
Jeff Layton | 3705ad6 | 2014-10-28 14:24:13 -0400 | [diff] [blame] | 999 | __entry->status = status; |
| 1000 | __assign_str(addr, xprt->address_strings[RPC_DISPLAY_ADDR]); |
| 1001 | __assign_str(port, xprt->address_strings[RPC_DISPLAY_PORT]); |
| 1002 | ), |
| 1003 | |
Chuck Lever | a30ccf1 | 2017-10-20 10:35:18 -0400 | [diff] [blame] | 1004 | TP_printk("peer=[%s]:%s xid=0x%08x status=%d", __get_str(addr), |
| 1005 | __get_str(port), __entry->xid, |
Jeff Layton | 3705ad6 | 2014-10-28 14:24:13 -0400 | [diff] [blame] | 1006 | __entry->status) |
| 1007 | ); |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 1008 | #define DEFINE_RPC_XPRT_EVENT(name) \ |
| 1009 | DEFINE_EVENT(rpc_xprt_event, xprt_##name, \ |
| 1010 | TP_PROTO( \ |
| 1011 | const struct rpc_xprt *xprt, \ |
| 1012 | __be32 xid, \ |
| 1013 | int status \ |
| 1014 | ), \ |
| 1015 | TP_ARGS(xprt, xid, status)) |
Jeff Layton | 3705ad6 | 2014-10-28 14:24:13 -0400 | [diff] [blame] | 1016 | |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 1017 | DEFINE_RPC_XPRT_EVENT(timer); |
| 1018 | DEFINE_RPC_XPRT_EVENT(lookup_rqst); |
Jeff Layton | 3705ad6 | 2014-10-28 14:24:13 -0400 | [diff] [blame] | 1019 | |
Chuck Lever | 0c77668 | 2019-02-11 11:25:04 -0500 | [diff] [blame] | 1020 | TRACE_EVENT(xprt_transmit, |
| 1021 | TP_PROTO( |
| 1022 | const struct rpc_rqst *rqst, |
| 1023 | int status |
| 1024 | ), |
| 1025 | |
| 1026 | TP_ARGS(rqst, status), |
| 1027 | |
| 1028 | TP_STRUCT__entry( |
| 1029 | __field(unsigned int, task_id) |
| 1030 | __field(unsigned int, client_id) |
| 1031 | __field(u32, xid) |
| 1032 | __field(u32, seqno) |
| 1033 | __field(int, status) |
| 1034 | ), |
| 1035 | |
| 1036 | TP_fast_assign( |
| 1037 | __entry->task_id = rqst->rq_task->tk_pid; |
Olga Kornievskaia | f87b543 | 2019-03-12 12:06:35 -0400 | [diff] [blame] | 1038 | __entry->client_id = rqst->rq_task->tk_client ? |
| 1039 | rqst->rq_task->tk_client->cl_clid : -1; |
Chuck Lever | 0c77668 | 2019-02-11 11:25:04 -0500 | [diff] [blame] | 1040 | __entry->xid = be32_to_cpu(rqst->rq_xid); |
| 1041 | __entry->seqno = rqst->rq_seqno; |
| 1042 | __entry->status = status; |
| 1043 | ), |
| 1044 | |
| 1045 | TP_printk( |
| 1046 | "task:%u@%u xid=0x%08x seqno=%u status=%d", |
| 1047 | __entry->task_id, __entry->client_id, __entry->xid, |
| 1048 | __entry->seqno, __entry->status) |
| 1049 | ); |
| 1050 | |
Chuck Lever | e936a59 | 2021-03-31 13:22:27 -0400 | [diff] [blame] | 1051 | TRACE_EVENT(xprt_retransmit, |
| 1052 | TP_PROTO( |
| 1053 | const struct rpc_rqst *rqst |
| 1054 | ), |
| 1055 | |
| 1056 | TP_ARGS(rqst), |
| 1057 | |
| 1058 | TP_STRUCT__entry( |
| 1059 | __field(unsigned int, task_id) |
| 1060 | __field(unsigned int, client_id) |
| 1061 | __field(u32, xid) |
| 1062 | __field(int, ntrans) |
| 1063 | __field(int, version) |
Chuck Lever | be17b8c | 2021-07-19 10:48:34 -0400 | [diff] [blame] | 1064 | __field(unsigned long, timeout) |
Chuck Lever | e936a59 | 2021-03-31 13:22:27 -0400 | [diff] [blame] | 1065 | __string(progname, |
| 1066 | rqst->rq_task->tk_client->cl_program->name) |
Chuck Lever | be630b9 | 2021-07-19 10:48:28 -0400 | [diff] [blame] | 1067 | __string(procname, rpc_proc_name(rqst->rq_task)) |
Chuck Lever | e936a59 | 2021-03-31 13:22:27 -0400 | [diff] [blame] | 1068 | ), |
| 1069 | |
| 1070 | TP_fast_assign( |
| 1071 | struct rpc_task *task = rqst->rq_task; |
| 1072 | |
| 1073 | __entry->task_id = task->tk_pid; |
| 1074 | __entry->client_id = task->tk_client ? |
| 1075 | task->tk_client->cl_clid : -1; |
| 1076 | __entry->xid = be32_to_cpu(rqst->rq_xid); |
| 1077 | __entry->ntrans = rqst->rq_ntrans; |
Chuck Lever | be17b8c | 2021-07-19 10:48:34 -0400 | [diff] [blame] | 1078 | __entry->timeout = task->tk_timeout; |
Chuck Lever | e936a59 | 2021-03-31 13:22:27 -0400 | [diff] [blame] | 1079 | __assign_str(progname, |
Joe Perches | 78c14b3 | 2021-06-12 08:42:27 -0700 | [diff] [blame] | 1080 | task->tk_client->cl_program->name); |
Chuck Lever | e936a59 | 2021-03-31 13:22:27 -0400 | [diff] [blame] | 1081 | __entry->version = task->tk_client->cl_vers; |
Chuck Lever | be630b9 | 2021-07-19 10:48:28 -0400 | [diff] [blame] | 1082 | __assign_str(procname, rpc_proc_name(task)); |
Chuck Lever | e936a59 | 2021-03-31 13:22:27 -0400 | [diff] [blame] | 1083 | ), |
| 1084 | |
| 1085 | TP_printk( |
Chuck Lever | be17b8c | 2021-07-19 10:48:34 -0400 | [diff] [blame] | 1086 | "task:%u@%u xid=0x%08x %sv%d %s ntrans=%d timeout=%lu", |
Chuck Lever | e936a59 | 2021-03-31 13:22:27 -0400 | [diff] [blame] | 1087 | __entry->task_id, __entry->client_id, __entry->xid, |
Chuck Lever | be630b9 | 2021-07-19 10:48:28 -0400 | [diff] [blame] | 1088 | __get_str(progname), __entry->version, __get_str(procname), |
Chuck Lever | be17b8c | 2021-07-19 10:48:34 -0400 | [diff] [blame] | 1089 | __entry->ntrans, __entry->timeout |
Chuck Lever | be630b9 | 2021-07-19 10:48:28 -0400 | [diff] [blame] | 1090 | ) |
Chuck Lever | e936a59 | 2021-03-31 13:22:27 -0400 | [diff] [blame] | 1091 | ); |
| 1092 | |
Chuck Lever | a25a4cb | 2018-03-16 10:33:55 -0400 | [diff] [blame] | 1093 | TRACE_EVENT(xprt_ping, |
| 1094 | TP_PROTO(const struct rpc_xprt *xprt, int status), |
| 1095 | |
| 1096 | TP_ARGS(xprt, status), |
| 1097 | |
| 1098 | TP_STRUCT__entry( |
| 1099 | __field(int, status) |
| 1100 | __string(addr, xprt->address_strings[RPC_DISPLAY_ADDR]) |
| 1101 | __string(port, xprt->address_strings[RPC_DISPLAY_PORT]) |
| 1102 | ), |
| 1103 | |
| 1104 | TP_fast_assign( |
| 1105 | __entry->status = status; |
| 1106 | __assign_str(addr, xprt->address_strings[RPC_DISPLAY_ADDR]); |
| 1107 | __assign_str(port, xprt->address_strings[RPC_DISPLAY_PORT]); |
| 1108 | ), |
| 1109 | |
| 1110 | TP_printk("peer=[%s]:%s status=%d", |
| 1111 | __get_str(addr), __get_str(port), __entry->status) |
| 1112 | ); |
| 1113 | |
Chuck Lever | bf7ca70 | 2019-10-09 12:58:14 -0400 | [diff] [blame] | 1114 | DECLARE_EVENT_CLASS(xprt_writelock_event, |
| 1115 | TP_PROTO( |
| 1116 | const struct rpc_xprt *xprt, const struct rpc_task *task |
| 1117 | ), |
| 1118 | |
| 1119 | TP_ARGS(xprt, task), |
| 1120 | |
| 1121 | TP_STRUCT__entry( |
| 1122 | __field(unsigned int, task_id) |
| 1123 | __field(unsigned int, client_id) |
| 1124 | __field(unsigned int, snd_task_id) |
| 1125 | ), |
| 1126 | |
| 1127 | TP_fast_assign( |
| 1128 | if (task) { |
| 1129 | __entry->task_id = task->tk_pid; |
| 1130 | __entry->client_id = task->tk_client ? |
| 1131 | task->tk_client->cl_clid : -1; |
| 1132 | } else { |
| 1133 | __entry->task_id = -1; |
| 1134 | __entry->client_id = -1; |
| 1135 | } |
| 1136 | __entry->snd_task_id = xprt->snd_task ? |
| 1137 | xprt->snd_task->tk_pid : -1; |
| 1138 | ), |
| 1139 | |
| 1140 | TP_printk("task:%u@%u snd_task:%u", |
| 1141 | __entry->task_id, __entry->client_id, |
| 1142 | __entry->snd_task_id) |
| 1143 | ); |
| 1144 | |
| 1145 | #define DEFINE_WRITELOCK_EVENT(name) \ |
| 1146 | DEFINE_EVENT(xprt_writelock_event, xprt_##name, \ |
| 1147 | TP_PROTO( \ |
| 1148 | const struct rpc_xprt *xprt, \ |
| 1149 | const struct rpc_task *task \ |
| 1150 | ), \ |
| 1151 | TP_ARGS(xprt, task)) |
| 1152 | |
| 1153 | DEFINE_WRITELOCK_EVENT(reserve_xprt); |
| 1154 | DEFINE_WRITELOCK_EVENT(release_xprt); |
| 1155 | |
| 1156 | DECLARE_EVENT_CLASS(xprt_cong_event, |
| 1157 | TP_PROTO( |
| 1158 | const struct rpc_xprt *xprt, const struct rpc_task *task |
| 1159 | ), |
| 1160 | |
| 1161 | TP_ARGS(xprt, task), |
| 1162 | |
| 1163 | TP_STRUCT__entry( |
| 1164 | __field(unsigned int, task_id) |
| 1165 | __field(unsigned int, client_id) |
| 1166 | __field(unsigned int, snd_task_id) |
| 1167 | __field(unsigned long, cong) |
| 1168 | __field(unsigned long, cwnd) |
| 1169 | __field(bool, wait) |
| 1170 | ), |
| 1171 | |
| 1172 | TP_fast_assign( |
| 1173 | if (task) { |
| 1174 | __entry->task_id = task->tk_pid; |
| 1175 | __entry->client_id = task->tk_client ? |
| 1176 | task->tk_client->cl_clid : -1; |
| 1177 | } else { |
| 1178 | __entry->task_id = -1; |
| 1179 | __entry->client_id = -1; |
| 1180 | } |
| 1181 | __entry->snd_task_id = xprt->snd_task ? |
| 1182 | xprt->snd_task->tk_pid : -1; |
| 1183 | __entry->cong = xprt->cong; |
| 1184 | __entry->cwnd = xprt->cwnd; |
| 1185 | __entry->wait = test_bit(XPRT_CWND_WAIT, &xprt->state); |
| 1186 | ), |
| 1187 | |
| 1188 | TP_printk("task:%u@%u snd_task:%u cong=%lu cwnd=%lu%s", |
| 1189 | __entry->task_id, __entry->client_id, |
| 1190 | __entry->snd_task_id, __entry->cong, __entry->cwnd, |
| 1191 | __entry->wait ? " (wait)" : "") |
| 1192 | ); |
| 1193 | |
| 1194 | #define DEFINE_CONG_EVENT(name) \ |
| 1195 | DEFINE_EVENT(xprt_cong_event, xprt_##name, \ |
| 1196 | TP_PROTO( \ |
| 1197 | const struct rpc_xprt *xprt, \ |
| 1198 | const struct rpc_task *task \ |
| 1199 | ), \ |
| 1200 | TP_ARGS(xprt, task)) |
| 1201 | |
| 1202 | DEFINE_CONG_EVENT(reserve_cong); |
| 1203 | DEFINE_CONG_EVENT(release_cong); |
| 1204 | DEFINE_CONG_EVENT(get_cong); |
| 1205 | DEFINE_CONG_EVENT(put_cong); |
| 1206 | |
Chuck Lever | 09d2ba0 | 2020-07-08 16:09:21 -0400 | [diff] [blame] | 1207 | TRACE_EVENT(xprt_reserve, |
| 1208 | TP_PROTO( |
| 1209 | const struct rpc_rqst *rqst |
| 1210 | ), |
| 1211 | |
| 1212 | TP_ARGS(rqst), |
| 1213 | |
| 1214 | TP_STRUCT__entry( |
| 1215 | __field(unsigned int, task_id) |
| 1216 | __field(unsigned int, client_id) |
| 1217 | __field(u32, xid) |
| 1218 | ), |
| 1219 | |
| 1220 | TP_fast_assign( |
| 1221 | __entry->task_id = rqst->rq_task->tk_pid; |
| 1222 | __entry->client_id = rqst->rq_task->tk_client->cl_clid; |
| 1223 | __entry->xid = be32_to_cpu(rqst->rq_xid); |
| 1224 | ), |
| 1225 | |
| 1226 | TP_printk("task:%u@%u xid=0x%08x", |
| 1227 | __entry->task_id, __entry->client_id, __entry->xid |
| 1228 | ) |
| 1229 | ); |
| 1230 | |
Trond Myklebust | c50b8ee | 2018-09-14 14:26:28 -0400 | [diff] [blame] | 1231 | TRACE_EVENT(xs_stream_read_data, |
| 1232 | TP_PROTO(struct rpc_xprt *xprt, ssize_t err, size_t total), |
Jeff Layton | 3705ad6 | 2014-10-28 14:24:13 -0400 | [diff] [blame] | 1233 | |
| 1234 | TP_ARGS(xprt, err, total), |
| 1235 | |
| 1236 | TP_STRUCT__entry( |
Trond Myklebust | c50b8ee | 2018-09-14 14:26:28 -0400 | [diff] [blame] | 1237 | __field(ssize_t, err) |
| 1238 | __field(size_t, total) |
Jeff Layton | 3705ad6 | 2014-10-28 14:24:13 -0400 | [diff] [blame] | 1239 | __string(addr, xprt ? xprt->address_strings[RPC_DISPLAY_ADDR] : |
| 1240 | "(null)") |
| 1241 | __string(port, xprt ? xprt->address_strings[RPC_DISPLAY_PORT] : |
| 1242 | "(null)") |
| 1243 | ), |
| 1244 | |
| 1245 | TP_fast_assign( |
| 1246 | __entry->err = err; |
| 1247 | __entry->total = total; |
| 1248 | __assign_str(addr, xprt ? |
| 1249 | xprt->address_strings[RPC_DISPLAY_ADDR] : "(null)"); |
| 1250 | __assign_str(port, xprt ? |
| 1251 | xprt->address_strings[RPC_DISPLAY_PORT] : "(null)"); |
| 1252 | ), |
| 1253 | |
Trond Myklebust | c50b8ee | 2018-09-14 14:26:28 -0400 | [diff] [blame] | 1254 | TP_printk("peer=[%s]:%s err=%zd total=%zu", __get_str(addr), |
Jeff Layton | 3705ad6 | 2014-10-28 14:24:13 -0400 | [diff] [blame] | 1255 | __get_str(port), __entry->err, __entry->total) |
| 1256 | ); |
| 1257 | |
Trond Myklebust | c50b8ee | 2018-09-14 14:26:28 -0400 | [diff] [blame] | 1258 | TRACE_EVENT(xs_stream_read_request, |
Jeff Layton | 1a867a0 | 2014-10-28 14:24:14 -0400 | [diff] [blame] | 1259 | TP_PROTO(struct sock_xprt *xs), |
| 1260 | |
| 1261 | TP_ARGS(xs), |
| 1262 | |
| 1263 | TP_STRUCT__entry( |
| 1264 | __string(addr, xs->xprt.address_strings[RPC_DISPLAY_ADDR]) |
| 1265 | __string(port, xs->xprt.address_strings[RPC_DISPLAY_PORT]) |
Chuck Lever | a30ccf1 | 2017-10-20 10:35:18 -0400 | [diff] [blame] | 1266 | __field(u32, xid) |
Jeff Layton | 1a867a0 | 2014-10-28 14:24:14 -0400 | [diff] [blame] | 1267 | __field(unsigned long, copied) |
| 1268 | __field(unsigned int, reclen) |
Trond Myklebust | c50b8ee | 2018-09-14 14:26:28 -0400 | [diff] [blame] | 1269 | __field(unsigned int, offset) |
Jeff Layton | 1a867a0 | 2014-10-28 14:24:14 -0400 | [diff] [blame] | 1270 | ), |
| 1271 | |
| 1272 | TP_fast_assign( |
| 1273 | __assign_str(addr, xs->xprt.address_strings[RPC_DISPLAY_ADDR]); |
| 1274 | __assign_str(port, xs->xprt.address_strings[RPC_DISPLAY_PORT]); |
Trond Myklebust | d1109aa | 2018-08-13 15:48:42 -0400 | [diff] [blame] | 1275 | __entry->xid = be32_to_cpu(xs->recv.xid); |
Trond Myklebust | d1109aa | 2018-08-13 15:48:42 -0400 | [diff] [blame] | 1276 | __entry->copied = xs->recv.copied; |
| 1277 | __entry->reclen = xs->recv.len; |
| 1278 | __entry->offset = xs->recv.offset; |
Jeff Layton | 1a867a0 | 2014-10-28 14:24:14 -0400 | [diff] [blame] | 1279 | ), |
| 1280 | |
Trond Myklebust | c50b8ee | 2018-09-14 14:26:28 -0400 | [diff] [blame] | 1281 | TP_printk("peer=[%s]:%s xid=0x%08x copied=%lu reclen=%u offset=%u", |
Chuck Lever | a30ccf1 | 2017-10-20 10:35:18 -0400 | [diff] [blame] | 1282 | __get_str(addr), __get_str(port), __entry->xid, |
Jeff Layton | 1a867a0 | 2014-10-28 14:24:14 -0400 | [diff] [blame] | 1283 | __entry->copied, __entry->reclen, __entry->offset) |
| 1284 | ); |
| 1285 | |
Chuck Lever | e465cc3 | 2020-07-08 16:10:19 -0400 | [diff] [blame] | 1286 | TRACE_EVENT(rpcb_getport, |
| 1287 | TP_PROTO( |
| 1288 | const struct rpc_clnt *clnt, |
| 1289 | const struct rpc_task *task, |
| 1290 | unsigned int bind_version |
| 1291 | ), |
| 1292 | |
| 1293 | TP_ARGS(clnt, task, bind_version), |
| 1294 | |
| 1295 | TP_STRUCT__entry( |
| 1296 | __field(unsigned int, task_id) |
| 1297 | __field(unsigned int, client_id) |
| 1298 | __field(unsigned int, program) |
| 1299 | __field(unsigned int, version) |
| 1300 | __field(int, protocol) |
| 1301 | __field(unsigned int, bind_version) |
| 1302 | __string(servername, task->tk_xprt->servername) |
| 1303 | ), |
| 1304 | |
| 1305 | TP_fast_assign( |
| 1306 | __entry->task_id = task->tk_pid; |
| 1307 | __entry->client_id = clnt->cl_clid; |
| 1308 | __entry->program = clnt->cl_prog; |
| 1309 | __entry->version = clnt->cl_vers; |
| 1310 | __entry->protocol = task->tk_xprt->prot; |
| 1311 | __entry->bind_version = bind_version; |
| 1312 | __assign_str(servername, task->tk_xprt->servername); |
| 1313 | ), |
| 1314 | |
| 1315 | TP_printk("task:%u@%u server=%s program=%u version=%u protocol=%d bind_version=%u", |
| 1316 | __entry->task_id, __entry->client_id, __get_str(servername), |
| 1317 | __entry->program, __entry->version, __entry->protocol, |
| 1318 | __entry->bind_version |
| 1319 | ) |
| 1320 | ); |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 1321 | |
Chuck Lever | ac1ae53 | 2020-07-08 16:10:24 -0400 | [diff] [blame] | 1322 | TRACE_EVENT(rpcb_setport, |
| 1323 | TP_PROTO( |
| 1324 | const struct rpc_task *task, |
| 1325 | int status, |
| 1326 | unsigned short port |
| 1327 | ), |
| 1328 | |
| 1329 | TP_ARGS(task, status, port), |
| 1330 | |
| 1331 | TP_STRUCT__entry( |
| 1332 | __field(unsigned int, task_id) |
| 1333 | __field(unsigned int, client_id) |
| 1334 | __field(int, status) |
| 1335 | __field(unsigned short, port) |
| 1336 | ), |
| 1337 | |
| 1338 | TP_fast_assign( |
| 1339 | __entry->task_id = task->tk_pid; |
| 1340 | __entry->client_id = task->tk_client->cl_clid; |
| 1341 | __entry->status = status; |
| 1342 | __entry->port = port; |
| 1343 | ), |
| 1344 | |
| 1345 | TP_printk("task:%u@%u status=%d port=%u", |
| 1346 | __entry->task_id, __entry->client_id, |
| 1347 | __entry->status, __entry->port |
| 1348 | ) |
| 1349 | ); |
| 1350 | |
Chuck Lever | c3adcc7 | 2020-07-08 16:10:40 -0400 | [diff] [blame] | 1351 | TRACE_EVENT(pmap_register, |
| 1352 | TP_PROTO( |
| 1353 | u32 program, |
| 1354 | u32 version, |
| 1355 | int protocol, |
| 1356 | unsigned short port |
| 1357 | ), |
| 1358 | |
| 1359 | TP_ARGS(program, version, protocol, port), |
| 1360 | |
| 1361 | TP_STRUCT__entry( |
| 1362 | __field(unsigned int, program) |
| 1363 | __field(unsigned int, version) |
| 1364 | __field(int, protocol) |
| 1365 | __field(unsigned int, port) |
| 1366 | ), |
| 1367 | |
| 1368 | TP_fast_assign( |
| 1369 | __entry->program = program; |
| 1370 | __entry->version = version; |
| 1371 | __entry->protocol = protocol; |
| 1372 | __entry->port = port; |
| 1373 | ), |
| 1374 | |
| 1375 | TP_printk("program=%u version=%u protocol=%d port=%u", |
| 1376 | __entry->program, __entry->version, |
| 1377 | __entry->protocol, __entry->port |
| 1378 | ) |
| 1379 | ); |
| 1380 | |
| 1381 | TRACE_EVENT(rpcb_register, |
| 1382 | TP_PROTO( |
| 1383 | u32 program, |
| 1384 | u32 version, |
| 1385 | const char *addr, |
| 1386 | const char *netid |
| 1387 | ), |
| 1388 | |
| 1389 | TP_ARGS(program, version, addr, netid), |
| 1390 | |
| 1391 | TP_STRUCT__entry( |
| 1392 | __field(unsigned int, program) |
| 1393 | __field(unsigned int, version) |
| 1394 | __string(addr, addr) |
| 1395 | __string(netid, netid) |
| 1396 | ), |
| 1397 | |
| 1398 | TP_fast_assign( |
| 1399 | __entry->program = program; |
| 1400 | __entry->version = version; |
| 1401 | __assign_str(addr, addr); |
| 1402 | __assign_str(netid, netid); |
| 1403 | ), |
| 1404 | |
| 1405 | TP_printk("program=%u version=%u addr=%s netid=%s", |
| 1406 | __entry->program, __entry->version, |
| 1407 | __get_str(addr), __get_str(netid) |
| 1408 | ) |
| 1409 | ); |
| 1410 | |
| 1411 | TRACE_EVENT(rpcb_unregister, |
| 1412 | TP_PROTO( |
| 1413 | u32 program, |
| 1414 | u32 version, |
| 1415 | const char *netid |
| 1416 | ), |
| 1417 | |
| 1418 | TP_ARGS(program, version, netid), |
| 1419 | |
| 1420 | TP_STRUCT__entry( |
| 1421 | __field(unsigned int, program) |
| 1422 | __field(unsigned int, version) |
| 1423 | __string(netid, netid) |
| 1424 | ), |
| 1425 | |
| 1426 | TP_fast_assign( |
| 1427 | __entry->program = program; |
| 1428 | __entry->version = version; |
| 1429 | __assign_str(netid, netid); |
| 1430 | ), |
| 1431 | |
| 1432 | TP_printk("program=%u version=%u netid=%s", |
| 1433 | __entry->program, __entry->version, __get_str(netid) |
| 1434 | ) |
| 1435 | ); |
| 1436 | |
Chuck Lever | 5f39d27 | 2021-01-03 14:39:27 -0500 | [diff] [blame] | 1437 | /* Record an xdr_buf containing a fully-formed RPC message */ |
| 1438 | DECLARE_EVENT_CLASS(svc_xdr_msg_class, |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 1439 | TP_PROTO( |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 1440 | const struct xdr_buf *xdr |
| 1441 | ), |
| 1442 | |
Chuck Lever | 5f39d27 | 2021-01-03 14:39:27 -0500 | [diff] [blame] | 1443 | TP_ARGS(xdr), |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 1444 | |
| 1445 | TP_STRUCT__entry( |
| 1446 | __field(u32, xid) |
| 1447 | __field(const void *, head_base) |
| 1448 | __field(size_t, head_len) |
| 1449 | __field(const void *, tail_base) |
| 1450 | __field(size_t, tail_len) |
| 1451 | __field(unsigned int, page_len) |
| 1452 | __field(unsigned int, msg_len) |
| 1453 | ), |
| 1454 | |
| 1455 | TP_fast_assign( |
Chuck Lever | 5f39d27 | 2021-01-03 14:39:27 -0500 | [diff] [blame] | 1456 | __be32 *p = (__be32 *)xdr->head[0].iov_base; |
| 1457 | |
| 1458 | __entry->xid = be32_to_cpu(*p); |
| 1459 | __entry->head_base = p; |
| 1460 | __entry->head_len = xdr->head[0].iov_len; |
| 1461 | __entry->tail_base = xdr->tail[0].iov_base; |
| 1462 | __entry->tail_len = xdr->tail[0].iov_len; |
| 1463 | __entry->page_len = xdr->page_len; |
| 1464 | __entry->msg_len = xdr->len; |
| 1465 | ), |
| 1466 | |
| 1467 | TP_printk("xid=0x%08x head=[%p,%zu] page=%u tail=[%p,%zu] len=%u", |
| 1468 | __entry->xid, |
| 1469 | __entry->head_base, __entry->head_len, __entry->page_len, |
| 1470 | __entry->tail_base, __entry->tail_len, __entry->msg_len |
| 1471 | ) |
| 1472 | ); |
| 1473 | |
| 1474 | #define DEFINE_SVCXDRMSG_EVENT(name) \ |
| 1475 | DEFINE_EVENT(svc_xdr_msg_class, \ |
| 1476 | svc_xdr_##name, \ |
| 1477 | TP_PROTO( \ |
| 1478 | const struct xdr_buf *xdr \ |
| 1479 | ), \ |
| 1480 | TP_ARGS(xdr)) |
| 1481 | |
| 1482 | DEFINE_SVCXDRMSG_EVENT(recvfrom); |
| 1483 | |
| 1484 | /* Record an xdr_buf containing arbitrary data, tagged with an XID */ |
| 1485 | DECLARE_EVENT_CLASS(svc_xdr_buf_class, |
| 1486 | TP_PROTO( |
| 1487 | __be32 xid, |
| 1488 | const struct xdr_buf *xdr |
| 1489 | ), |
| 1490 | |
| 1491 | TP_ARGS(xid, xdr), |
| 1492 | |
| 1493 | TP_STRUCT__entry( |
| 1494 | __field(u32, xid) |
| 1495 | __field(const void *, head_base) |
| 1496 | __field(size_t, head_len) |
| 1497 | __field(const void *, tail_base) |
| 1498 | __field(size_t, tail_len) |
| 1499 | __field(unsigned int, page_len) |
| 1500 | __field(unsigned int, msg_len) |
| 1501 | ), |
| 1502 | |
| 1503 | TP_fast_assign( |
| 1504 | __entry->xid = be32_to_cpu(xid); |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 1505 | __entry->head_base = xdr->head[0].iov_base; |
| 1506 | __entry->head_len = xdr->head[0].iov_len; |
| 1507 | __entry->tail_base = xdr->tail[0].iov_base; |
| 1508 | __entry->tail_len = xdr->tail[0].iov_len; |
| 1509 | __entry->page_len = xdr->page_len; |
| 1510 | __entry->msg_len = xdr->len; |
| 1511 | ), |
| 1512 | |
| 1513 | TP_printk("xid=0x%08x head=[%p,%zu] page=%u tail=[%p,%zu] len=%u", |
| 1514 | __entry->xid, |
| 1515 | __entry->head_base, __entry->head_len, __entry->page_len, |
| 1516 | __entry->tail_base, __entry->tail_len, __entry->msg_len |
| 1517 | ) |
| 1518 | ); |
| 1519 | |
| 1520 | #define DEFINE_SVCXDRBUF_EVENT(name) \ |
| 1521 | DEFINE_EVENT(svc_xdr_buf_class, \ |
| 1522 | svc_xdr_##name, \ |
| 1523 | TP_PROTO( \ |
Chuck Lever | 5f39d27 | 2021-01-03 14:39:27 -0500 | [diff] [blame] | 1524 | __be32 xid, \ |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 1525 | const struct xdr_buf *xdr \ |
| 1526 | ), \ |
Chuck Lever | 5f39d27 | 2021-01-03 14:39:27 -0500 | [diff] [blame] | 1527 | TP_ARGS(xid, xdr)) |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 1528 | |
Chuck Lever | c509f15a | 2020-05-12 17:13:28 -0400 | [diff] [blame] | 1529 | DEFINE_SVCXDRBUF_EVENT(sendto); |
| 1530 | |
Chuck Lever | a68d5a50 | 2020-07-24 15:26:47 -0400 | [diff] [blame] | 1531 | /* |
| 1532 | * from include/linux/sunrpc/svc.h |
| 1533 | */ |
| 1534 | #define SVC_RQST_FLAG_LIST \ |
| 1535 | svc_rqst_flag(SECURE) \ |
| 1536 | svc_rqst_flag(LOCAL) \ |
| 1537 | svc_rqst_flag(USEDEFERRAL) \ |
| 1538 | svc_rqst_flag(DROPME) \ |
| 1539 | svc_rqst_flag(SPLICE_OK) \ |
| 1540 | svc_rqst_flag(VICTIM) \ |
| 1541 | svc_rqst_flag(BUSY) \ |
Chuck Lever | 9082e1d | 2021-07-15 15:52:19 -0400 | [diff] [blame] | 1542 | svc_rqst_flag_end(DATA) |
Chuck Lever | a68d5a50 | 2020-07-24 15:26:47 -0400 | [diff] [blame] | 1543 | |
| 1544 | #undef svc_rqst_flag |
| 1545 | #undef svc_rqst_flag_end |
| 1546 | #define svc_rqst_flag(x) TRACE_DEFINE_ENUM(RQ_##x); |
| 1547 | #define svc_rqst_flag_end(x) TRACE_DEFINE_ENUM(RQ_##x); |
| 1548 | |
| 1549 | SVC_RQST_FLAG_LIST |
| 1550 | |
| 1551 | #undef svc_rqst_flag |
| 1552 | #undef svc_rqst_flag_end |
| 1553 | #define svc_rqst_flag(x) { BIT(RQ_##x), #x }, |
| 1554 | #define svc_rqst_flag_end(x) { BIT(RQ_##x), #x } |
| 1555 | |
Jeff Layton | 30660e04b | 2014-11-19 07:51:16 -0500 | [diff] [blame] | 1556 | #define show_rqstp_flags(flags) \ |
Chuck Lever | a68d5a50 | 2020-07-24 15:26:47 -0400 | [diff] [blame] | 1557 | __print_flags(flags, "|", SVC_RQST_FLAG_LIST) |
Jeff Layton | 4d152e2 | 2014-11-19 07:51:14 -0500 | [diff] [blame] | 1558 | |
Chuck Lever | d88ff95 | 2020-04-15 09:47:41 -0400 | [diff] [blame] | 1559 | TRACE_DEFINE_ENUM(SVC_GARBAGE); |
| 1560 | TRACE_DEFINE_ENUM(SVC_SYSERR); |
| 1561 | TRACE_DEFINE_ENUM(SVC_VALID); |
| 1562 | TRACE_DEFINE_ENUM(SVC_NEGATIVE); |
| 1563 | TRACE_DEFINE_ENUM(SVC_OK); |
| 1564 | TRACE_DEFINE_ENUM(SVC_DROP); |
| 1565 | TRACE_DEFINE_ENUM(SVC_CLOSE); |
| 1566 | TRACE_DEFINE_ENUM(SVC_DENIED); |
| 1567 | TRACE_DEFINE_ENUM(SVC_PENDING); |
| 1568 | TRACE_DEFINE_ENUM(SVC_COMPLETE); |
| 1569 | |
Chuck Lever | ff27e9f | 2019-10-24 09:34:10 -0400 | [diff] [blame] | 1570 | #define svc_show_status(status) \ |
| 1571 | __print_symbolic(status, \ |
| 1572 | { SVC_GARBAGE, "SVC_GARBAGE" }, \ |
| 1573 | { SVC_SYSERR, "SVC_SYSERR" }, \ |
| 1574 | { SVC_VALID, "SVC_VALID" }, \ |
| 1575 | { SVC_NEGATIVE, "SVC_NEGATIVE" }, \ |
| 1576 | { SVC_OK, "SVC_OK" }, \ |
| 1577 | { SVC_DROP, "SVC_DROP" }, \ |
| 1578 | { SVC_CLOSE, "SVC_CLOSE" }, \ |
| 1579 | { SVC_DENIED, "SVC_DENIED" }, \ |
| 1580 | { SVC_PENDING, "SVC_PENDING" }, \ |
| 1581 | { SVC_COMPLETE, "SVC_COMPLETE" }) |
| 1582 | |
| 1583 | TRACE_EVENT(svc_authenticate, |
Chuck Lever | 438623a | 2021-07-15 15:52:06 -0400 | [diff] [blame] | 1584 | TP_PROTO(const struct svc_rqst *rqst, int auth_res), |
Chuck Lever | ff27e9f | 2019-10-24 09:34:10 -0400 | [diff] [blame] | 1585 | |
Chuck Lever | 438623a | 2021-07-15 15:52:06 -0400 | [diff] [blame] | 1586 | TP_ARGS(rqst, auth_res), |
Chuck Lever | ff27e9f | 2019-10-24 09:34:10 -0400 | [diff] [blame] | 1587 | |
| 1588 | TP_STRUCT__entry( |
| 1589 | __field(u32, xid) |
| 1590 | __field(unsigned long, svc_status) |
| 1591 | __field(unsigned long, auth_stat) |
| 1592 | ), |
| 1593 | |
| 1594 | TP_fast_assign( |
| 1595 | __entry->xid = be32_to_cpu(rqst->rq_xid); |
| 1596 | __entry->svc_status = auth_res; |
Chuck Lever | 438623a | 2021-07-15 15:52:06 -0400 | [diff] [blame] | 1597 | __entry->auth_stat = be32_to_cpu(rqst->rq_auth_stat); |
Chuck Lever | ff27e9f | 2019-10-24 09:34:10 -0400 | [diff] [blame] | 1598 | ), |
| 1599 | |
| 1600 | TP_printk("xid=0x%08x auth_res=%s auth_stat=%s", |
| 1601 | __entry->xid, svc_show_status(__entry->svc_status), |
| 1602 | rpc_show_auth_stat(__entry->auth_stat)) |
| 1603 | ); |
| 1604 | |
Chuck Lever | 0b9547b | 2018-03-27 10:51:22 -0400 | [diff] [blame] | 1605 | TRACE_EVENT(svc_process, |
| 1606 | TP_PROTO(const struct svc_rqst *rqst, const char *name), |
| 1607 | |
| 1608 | TP_ARGS(rqst, name), |
| 1609 | |
| 1610 | TP_STRUCT__entry( |
| 1611 | __field(u32, xid) |
| 1612 | __field(u32, vers) |
| 1613 | __field(u32, proc) |
| 1614 | __string(service, name) |
Chuck Lever | 5c11720 | 2021-08-05 15:11:24 -0400 | [diff] [blame] | 1615 | __string(procedure, svc_proc_name(rqst)) |
Vasily Averin | d4b09ac | 2018-12-24 14:44:52 +0300 | [diff] [blame] | 1616 | __string(addr, rqst->rq_xprt ? |
| 1617 | rqst->rq_xprt->xpt_remotebuf : "(null)") |
Chuck Lever | 0b9547b | 2018-03-27 10:51:22 -0400 | [diff] [blame] | 1618 | ), |
| 1619 | |
| 1620 | TP_fast_assign( |
| 1621 | __entry->xid = be32_to_cpu(rqst->rq_xid); |
| 1622 | __entry->vers = rqst->rq_vers; |
| 1623 | __entry->proc = rqst->rq_proc; |
| 1624 | __assign_str(service, name); |
Chuck Lever | 5c11720 | 2021-08-05 15:11:24 -0400 | [diff] [blame] | 1625 | __assign_str(procedure, svc_proc_name(rqst)); |
Vasily Averin | d4b09ac | 2018-12-24 14:44:52 +0300 | [diff] [blame] | 1626 | __assign_str(addr, rqst->rq_xprt ? |
| 1627 | rqst->rq_xprt->xpt_remotebuf : "(null)"); |
Chuck Lever | 0b9547b | 2018-03-27 10:51:22 -0400 | [diff] [blame] | 1628 | ), |
| 1629 | |
Chuck Lever | 89ff874 | 2020-12-03 10:22:09 -0500 | [diff] [blame] | 1630 | TP_printk("addr=%s xid=0x%08x service=%s vers=%u proc=%s", |
Chuck Lever | 0b9547b | 2018-03-27 10:51:22 -0400 | [diff] [blame] | 1631 | __get_str(addr), __entry->xid, |
Chuck Lever | 89ff874 | 2020-12-03 10:22:09 -0500 | [diff] [blame] | 1632 | __get_str(service), __entry->vers, |
| 1633 | __get_str(procedure) |
| 1634 | ) |
Chuck Lever | 0b9547b | 2018-03-27 10:51:22 -0400 | [diff] [blame] | 1635 | ); |
| 1636 | |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1637 | DECLARE_EVENT_CLASS(svc_rqst_event, |
| 1638 | |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 1639 | TP_PROTO( |
| 1640 | const struct svc_rqst *rqst |
| 1641 | ), |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1642 | |
| 1643 | TP_ARGS(rqst), |
| 1644 | |
| 1645 | TP_STRUCT__entry( |
Chuck Lever | a30ccf1 | 2017-10-20 10:35:18 -0400 | [diff] [blame] | 1646 | __field(u32, xid) |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1647 | __field(unsigned long, flags) |
Chuck Lever | ece200d | 2018-03-27 10:51:00 -0400 | [diff] [blame] | 1648 | __string(addr, rqst->rq_xprt->xpt_remotebuf) |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1649 | ), |
| 1650 | |
| 1651 | TP_fast_assign( |
Chuck Lever | a30ccf1 | 2017-10-20 10:35:18 -0400 | [diff] [blame] | 1652 | __entry->xid = be32_to_cpu(rqst->rq_xid); |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1653 | __entry->flags = rqst->rq_flags; |
Chuck Lever | ece200d | 2018-03-27 10:51:00 -0400 | [diff] [blame] | 1654 | __assign_str(addr, rqst->rq_xprt->xpt_remotebuf); |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1655 | ), |
| 1656 | |
Chuck Lever | ece200d | 2018-03-27 10:51:00 -0400 | [diff] [blame] | 1657 | TP_printk("addr=%s xid=0x%08x flags=%s", |
| 1658 | __get_str(addr), __entry->xid, |
| 1659 | show_rqstp_flags(__entry->flags)) |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1660 | ); |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 1661 | #define DEFINE_SVC_RQST_EVENT(name) \ |
| 1662 | DEFINE_EVENT(svc_rqst_event, svc_##name, \ |
| 1663 | TP_PROTO( \ |
| 1664 | const struct svc_rqst *rqst \ |
| 1665 | ), \ |
| 1666 | TP_ARGS(rqst)) |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1667 | |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 1668 | DEFINE_SVC_RQST_EVENT(defer); |
| 1669 | DEFINE_SVC_RQST_EVENT(drop); |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1670 | |
Jeff Layton | 860a0d9 | 2014-10-28 14:24:12 -0400 | [diff] [blame] | 1671 | DECLARE_EVENT_CLASS(svc_rqst_status, |
| 1672 | |
| 1673 | TP_PROTO(struct svc_rqst *rqst, int status), |
| 1674 | |
| 1675 | TP_ARGS(rqst, status), |
| 1676 | |
| 1677 | TP_STRUCT__entry( |
Chuck Lever | a30ccf1 | 2017-10-20 10:35:18 -0400 | [diff] [blame] | 1678 | __field(u32, xid) |
Jeff Layton | 860a0d9 | 2014-10-28 14:24:12 -0400 | [diff] [blame] | 1679 | __field(int, status) |
Jeff Layton | 4d152e2 | 2014-11-19 07:51:14 -0500 | [diff] [blame] | 1680 | __field(unsigned long, flags) |
Chuck Lever | ece200d | 2018-03-27 10:51:00 -0400 | [diff] [blame] | 1681 | __string(addr, rqst->rq_xprt->xpt_remotebuf) |
Jeff Layton | 860a0d9 | 2014-10-28 14:24:12 -0400 | [diff] [blame] | 1682 | ), |
| 1683 | |
| 1684 | TP_fast_assign( |
Chuck Lever | a30ccf1 | 2017-10-20 10:35:18 -0400 | [diff] [blame] | 1685 | __entry->xid = be32_to_cpu(rqst->rq_xid); |
Jeff Layton | 860a0d9 | 2014-10-28 14:24:12 -0400 | [diff] [blame] | 1686 | __entry->status = status; |
Jeff Layton | 4d152e2 | 2014-11-19 07:51:14 -0500 | [diff] [blame] | 1687 | __entry->flags = rqst->rq_flags; |
Chuck Lever | ece200d | 2018-03-27 10:51:00 -0400 | [diff] [blame] | 1688 | __assign_str(addr, rqst->rq_xprt->xpt_remotebuf); |
Jeff Layton | 860a0d9 | 2014-10-28 14:24:12 -0400 | [diff] [blame] | 1689 | ), |
| 1690 | |
Chuck Lever | ece200d | 2018-03-27 10:51:00 -0400 | [diff] [blame] | 1691 | TP_printk("addr=%s xid=0x%08x status=%d flags=%s", |
| 1692 | __get_str(addr), __entry->xid, |
| 1693 | __entry->status, show_rqstp_flags(__entry->flags)) |
Jeff Layton | 860a0d9 | 2014-10-28 14:24:12 -0400 | [diff] [blame] | 1694 | ); |
| 1695 | |
Jeff Layton | 860a0d9 | 2014-10-28 14:24:12 -0400 | [diff] [blame] | 1696 | DEFINE_EVENT(svc_rqst_status, svc_send, |
| 1697 | TP_PROTO(struct svc_rqst *rqst, int status), |
| 1698 | TP_ARGS(rqst, status)); |
| 1699 | |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1700 | #define show_svc_xprt_flags(flags) \ |
| 1701 | __print_flags(flags, "|", \ |
| 1702 | { (1UL << XPT_BUSY), "XPT_BUSY"}, \ |
| 1703 | { (1UL << XPT_CONN), "XPT_CONN"}, \ |
| 1704 | { (1UL << XPT_CLOSE), "XPT_CLOSE"}, \ |
| 1705 | { (1UL << XPT_DATA), "XPT_DATA"}, \ |
| 1706 | { (1UL << XPT_TEMP), "XPT_TEMP"}, \ |
| 1707 | { (1UL << XPT_DEAD), "XPT_DEAD"}, \ |
| 1708 | { (1UL << XPT_CHNGBUF), "XPT_CHNGBUF"}, \ |
| 1709 | { (1UL << XPT_DEFERRED), "XPT_DEFERRED"}, \ |
| 1710 | { (1UL << XPT_OLD), "XPT_OLD"}, \ |
| 1711 | { (1UL << XPT_LISTENER), "XPT_LISTENER"}, \ |
| 1712 | { (1UL << XPT_CACHE_AUTH), "XPT_CACHE_AUTH"}, \ |
Chuck Lever | 03edb90 | 2018-03-27 10:49:53 -0400 | [diff] [blame] | 1713 | { (1UL << XPT_LOCAL), "XPT_LOCAL"}, \ |
| 1714 | { (1UL << XPT_KILL_TEMP), "XPT_KILL_TEMP"}, \ |
| 1715 | { (1UL << XPT_CONG_CTRL), "XPT_CONG_CTRL"}) |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1716 | |
Chuck Lever | 4b8f380 | 2020-04-28 17:13:32 -0400 | [diff] [blame] | 1717 | TRACE_EVENT(svc_xprt_create_err, |
| 1718 | TP_PROTO( |
| 1719 | const char *program, |
| 1720 | const char *protocol, |
| 1721 | struct sockaddr *sap, |
| 1722 | const struct svc_xprt *xprt |
| 1723 | ), |
| 1724 | |
| 1725 | TP_ARGS(program, protocol, sap, xprt), |
| 1726 | |
| 1727 | TP_STRUCT__entry( |
| 1728 | __field(long, error) |
| 1729 | __string(program, program) |
| 1730 | __string(protocol, protocol) |
| 1731 | __array(unsigned char, addr, sizeof(struct sockaddr_in6)) |
| 1732 | ), |
| 1733 | |
| 1734 | TP_fast_assign( |
| 1735 | __entry->error = PTR_ERR(xprt); |
| 1736 | __assign_str(program, program); |
| 1737 | __assign_str(protocol, protocol); |
| 1738 | memcpy(__entry->addr, sap, sizeof(__entry->addr)); |
| 1739 | ), |
| 1740 | |
| 1741 | TP_printk("addr=%pISpc program=%s protocol=%s error=%ld", |
| 1742 | __entry->addr, __get_str(program), __get_str(protocol), |
| 1743 | __entry->error) |
| 1744 | ); |
| 1745 | |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1746 | TRACE_EVENT(svc_xprt_do_enqueue, |
| 1747 | TP_PROTO(struct svc_xprt *xprt, struct svc_rqst *rqst), |
| 1748 | |
| 1749 | TP_ARGS(xprt, rqst), |
| 1750 | |
| 1751 | TP_STRUCT__entry( |
Pratyush Anand | 051ac38 | 2015-08-27 10:01:33 +0530 | [diff] [blame] | 1752 | __field(int, pid) |
| 1753 | __field(unsigned long, flags) |
Chuck Lever | ece200d | 2018-03-27 10:51:00 -0400 | [diff] [blame] | 1754 | __string(addr, xprt->xpt_remotebuf) |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1755 | ), |
| 1756 | |
| 1757 | TP_fast_assign( |
Pratyush Anand | 051ac38 | 2015-08-27 10:01:33 +0530 | [diff] [blame] | 1758 | __entry->pid = rqst? rqst->rq_task->pid : 0; |
Chuck Lever | ece200d | 2018-03-27 10:51:00 -0400 | [diff] [blame] | 1759 | __entry->flags = xprt->xpt_flags; |
| 1760 | __assign_str(addr, xprt->xpt_remotebuf); |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1761 | ), |
| 1762 | |
Chuck Lever | e3e6762 | 2020-04-28 17:38:13 -0400 | [diff] [blame] | 1763 | TP_printk("addr=%s pid=%d flags=%s", __get_str(addr), |
| 1764 | __entry->pid, show_svc_xprt_flags(__entry->flags)) |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1765 | ); |
| 1766 | |
Trond Myklebust | 82ea2d7 | 2016-06-24 10:55:45 -0400 | [diff] [blame] | 1767 | DECLARE_EVENT_CLASS(svc_xprt_event, |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1768 | TP_PROTO(struct svc_xprt *xprt), |
| 1769 | |
| 1770 | TP_ARGS(xprt), |
| 1771 | |
| 1772 | TP_STRUCT__entry( |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1773 | __field(unsigned long, flags) |
Chuck Lever | ece200d | 2018-03-27 10:51:00 -0400 | [diff] [blame] | 1774 | __string(addr, xprt->xpt_remotebuf) |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1775 | ), |
| 1776 | |
| 1777 | TP_fast_assign( |
Chuck Lever | caa3e106d | 2018-03-27 10:50:07 -0400 | [diff] [blame] | 1778 | __entry->flags = xprt->xpt_flags; |
Chuck Lever | ece200d | 2018-03-27 10:51:00 -0400 | [diff] [blame] | 1779 | __assign_str(addr, xprt->xpt_remotebuf); |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1780 | ), |
| 1781 | |
Chuck Lever | e3e6762 | 2020-04-28 17:38:13 -0400 | [diff] [blame] | 1782 | TP_printk("addr=%s flags=%s", __get_str(addr), |
| 1783 | show_svc_xprt_flags(__entry->flags)) |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1784 | ); |
| 1785 | |
Chuck Lever | 11bbb0f | 2020-03-17 17:41:43 -0400 | [diff] [blame] | 1786 | #define DEFINE_SVC_XPRT_EVENT(name) \ |
| 1787 | DEFINE_EVENT(svc_xprt_event, svc_xprt_##name, \ |
| 1788 | TP_PROTO( \ |
| 1789 | struct svc_xprt *xprt \ |
| 1790 | ), \ |
| 1791 | TP_ARGS(xprt)) |
| 1792 | |
Chuck Lever | 7dcfbd8 | 2021-01-29 13:04:04 -0500 | [diff] [blame] | 1793 | DEFINE_SVC_XPRT_EVENT(received); |
Chuck Lever | 11bbb0f | 2020-03-17 17:41:43 -0400 | [diff] [blame] | 1794 | DEFINE_SVC_XPRT_EVENT(no_write_space); |
| 1795 | DEFINE_SVC_XPRT_EVENT(close); |
| 1796 | DEFINE_SVC_XPRT_EVENT(detach); |
| 1797 | DEFINE_SVC_XPRT_EVENT(free); |
| 1798 | |
| 1799 | TRACE_EVENT(svc_xprt_accept, |
| 1800 | TP_PROTO( |
| 1801 | const struct svc_xprt *xprt, |
| 1802 | const char *service |
| 1803 | ), |
| 1804 | |
| 1805 | TP_ARGS(xprt, service), |
| 1806 | |
| 1807 | TP_STRUCT__entry( |
| 1808 | __string(addr, xprt->xpt_remotebuf) |
| 1809 | __string(protocol, xprt->xpt_class->xcl_name) |
| 1810 | __string(service, service) |
| 1811 | ), |
| 1812 | |
| 1813 | TP_fast_assign( |
| 1814 | __assign_str(addr, xprt->xpt_remotebuf); |
Joe Perches | 78c14b3 | 2021-06-12 08:42:27 -0700 | [diff] [blame] | 1815 | __assign_str(protocol, xprt->xpt_class->xcl_name); |
Chuck Lever | 11bbb0f | 2020-03-17 17:41:43 -0400 | [diff] [blame] | 1816 | __assign_str(service, service); |
| 1817 | ), |
| 1818 | |
| 1819 | TP_printk("addr=%s protocol=%s service=%s", |
| 1820 | __get_str(addr), __get_str(protocol), __get_str(service) |
| 1821 | ) |
| 1822 | ); |
Trond Myklebust | 82ea2d7 | 2016-06-24 10:55:45 -0400 | [diff] [blame] | 1823 | |
Chuck Lever | 55f5088 | 2018-03-27 10:52:27 -0400 | [diff] [blame] | 1824 | TRACE_EVENT(svc_xprt_dequeue, |
| 1825 | TP_PROTO(struct svc_rqst *rqst), |
| 1826 | |
| 1827 | TP_ARGS(rqst), |
| 1828 | |
| 1829 | TP_STRUCT__entry( |
Chuck Lever | 55f5088 | 2018-03-27 10:52:27 -0400 | [diff] [blame] | 1830 | __field(unsigned long, flags) |
| 1831 | __field(unsigned long, wakeup) |
| 1832 | __string(addr, rqst->rq_xprt->xpt_remotebuf) |
| 1833 | ), |
| 1834 | |
| 1835 | TP_fast_assign( |
Chuck Lever | 55f5088 | 2018-03-27 10:52:27 -0400 | [diff] [blame] | 1836 | __entry->flags = rqst->rq_xprt->xpt_flags; |
| 1837 | __entry->wakeup = ktime_to_us(ktime_sub(ktime_get(), |
| 1838 | rqst->rq_qtime)); |
| 1839 | __assign_str(addr, rqst->rq_xprt->xpt_remotebuf); |
| 1840 | ), |
| 1841 | |
Chuck Lever | e3e6762 | 2020-04-28 17:38:13 -0400 | [diff] [blame] | 1842 | TP_printk("addr=%s flags=%s wakeup-us=%lu", __get_str(addr), |
| 1843 | show_svc_xprt_flags(__entry->flags), __entry->wakeup) |
Chuck Lever | 55f5088 | 2018-03-27 10:52:27 -0400 | [diff] [blame] | 1844 | ); |
| 1845 | |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1846 | TRACE_EVENT(svc_wake_up, |
| 1847 | TP_PROTO(int pid), |
| 1848 | |
| 1849 | TP_ARGS(pid), |
| 1850 | |
| 1851 | TP_STRUCT__entry( |
| 1852 | __field(int, pid) |
| 1853 | ), |
| 1854 | |
| 1855 | TP_fast_assign( |
| 1856 | __entry->pid = pid; |
| 1857 | ), |
| 1858 | |
| 1859 | TP_printk("pid=%d", __entry->pid) |
| 1860 | ); |
| 1861 | |
Chuck Lever | 22a027e8 | 2021-10-04 10:16:26 -0400 | [diff] [blame^] | 1862 | TRACE_EVENT(svc_alloc_arg_err, |
| 1863 | TP_PROTO( |
| 1864 | unsigned int pages |
| 1865 | ), |
| 1866 | |
| 1867 | TP_ARGS(pages), |
| 1868 | |
| 1869 | TP_STRUCT__entry( |
| 1870 | __field(unsigned int, pages) |
| 1871 | ), |
| 1872 | |
| 1873 | TP_fast_assign( |
| 1874 | __entry->pages = pages; |
| 1875 | ), |
| 1876 | |
| 1877 | TP_printk("pages=%u", __entry->pages) |
| 1878 | ); |
| 1879 | |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1880 | TRACE_EVENT(svc_handle_xprt, |
| 1881 | TP_PROTO(struct svc_xprt *xprt, int len), |
| 1882 | |
| 1883 | TP_ARGS(xprt, len), |
| 1884 | |
| 1885 | TP_STRUCT__entry( |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1886 | __field(int, len) |
Pratyush Anand | 051ac38 | 2015-08-27 10:01:33 +0530 | [diff] [blame] | 1887 | __field(unsigned long, flags) |
Chuck Lever | ece200d | 2018-03-27 10:51:00 -0400 | [diff] [blame] | 1888 | __string(addr, xprt->xpt_remotebuf) |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1889 | ), |
| 1890 | |
| 1891 | TP_fast_assign( |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1892 | __entry->len = len; |
Chuck Lever | ece200d | 2018-03-27 10:51:00 -0400 | [diff] [blame] | 1893 | __entry->flags = xprt->xpt_flags; |
| 1894 | __assign_str(addr, xprt->xpt_remotebuf); |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1895 | ), |
| 1896 | |
Chuck Lever | e3e6762 | 2020-04-28 17:38:13 -0400 | [diff] [blame] | 1897 | TP_printk("addr=%s len=%d flags=%s", __get_str(addr), |
Pratyush Anand | 051ac38 | 2015-08-27 10:01:33 +0530 | [diff] [blame] | 1898 | __entry->len, show_svc_xprt_flags(__entry->flags)) |
Jeff Layton | 83a712e | 2014-11-21 14:19:31 -0500 | [diff] [blame] | 1899 | ); |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1900 | |
Chuck Lever | aaba72c | 2018-03-27 10:51:39 -0400 | [diff] [blame] | 1901 | TRACE_EVENT(svc_stats_latency, |
| 1902 | TP_PROTO(const struct svc_rqst *rqst), |
| 1903 | |
| 1904 | TP_ARGS(rqst), |
| 1905 | |
| 1906 | TP_STRUCT__entry( |
| 1907 | __field(u32, xid) |
| 1908 | __field(unsigned long, execute) |
Chuck Lever | 5c11720 | 2021-08-05 15:11:24 -0400 | [diff] [blame] | 1909 | __string(procedure, svc_proc_name(rqst)) |
Chuck Lever | aaba72c | 2018-03-27 10:51:39 -0400 | [diff] [blame] | 1910 | __string(addr, rqst->rq_xprt->xpt_remotebuf) |
| 1911 | ), |
| 1912 | |
| 1913 | TP_fast_assign( |
| 1914 | __entry->xid = be32_to_cpu(rqst->rq_xid); |
| 1915 | __entry->execute = ktime_to_us(ktime_sub(ktime_get(), |
| 1916 | rqst->rq_stime)); |
Chuck Lever | 5c11720 | 2021-08-05 15:11:24 -0400 | [diff] [blame] | 1917 | __assign_str(procedure, svc_proc_name(rqst)); |
Chuck Lever | aaba72c | 2018-03-27 10:51:39 -0400 | [diff] [blame] | 1918 | __assign_str(addr, rqst->rq_xprt->xpt_remotebuf); |
| 1919 | ), |
| 1920 | |
Chuck Lever | 89ff874 | 2020-12-03 10:22:09 -0500 | [diff] [blame] | 1921 | TP_printk("addr=%s xid=0x%08x proc=%s execute-us=%lu", |
| 1922 | __get_str(addr), __entry->xid, __get_str(procedure), |
| 1923 | __entry->execute) |
Chuck Lever | aaba72c | 2018-03-27 10:51:39 -0400 | [diff] [blame] | 1924 | ); |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1925 | |
| 1926 | DECLARE_EVENT_CLASS(svc_deferred_event, |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 1927 | TP_PROTO( |
| 1928 | const struct svc_deferred_req *dr |
| 1929 | ), |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1930 | |
| 1931 | TP_ARGS(dr), |
| 1932 | |
| 1933 | TP_STRUCT__entry( |
Chuck Lever | 8954c5c | 2020-04-15 09:05:26 -0400 | [diff] [blame] | 1934 | __field(const void *, dr) |
Chuck Lever | a30ccf1 | 2017-10-20 10:35:18 -0400 | [diff] [blame] | 1935 | __field(u32, xid) |
Chuck Lever | ece200d | 2018-03-27 10:51:00 -0400 | [diff] [blame] | 1936 | __string(addr, dr->xprt->xpt_remotebuf) |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1937 | ), |
| 1938 | |
| 1939 | TP_fast_assign( |
Chuck Lever | 8954c5c | 2020-04-15 09:05:26 -0400 | [diff] [blame] | 1940 | __entry->dr = dr; |
Chuck Lever | a30ccf1 | 2017-10-20 10:35:18 -0400 | [diff] [blame] | 1941 | __entry->xid = be32_to_cpu(*(__be32 *)(dr->args + |
| 1942 | (dr->xprt_hlen>>2))); |
Chuck Lever | ece200d | 2018-03-27 10:51:00 -0400 | [diff] [blame] | 1943 | __assign_str(addr, dr->xprt->xpt_remotebuf); |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1944 | ), |
| 1945 | |
Chuck Lever | 8954c5c | 2020-04-15 09:05:26 -0400 | [diff] [blame] | 1946 | TP_printk("addr=%s dr=%p xid=0x%08x", __get_str(addr), __entry->dr, |
| 1947 | __entry->xid) |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1948 | ); |
Chuck Lever | 8954c5c | 2020-04-15 09:05:26 -0400 | [diff] [blame] | 1949 | |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 1950 | #define DEFINE_SVC_DEFERRED_EVENT(name) \ |
Chuck Lever | 8954c5c | 2020-04-15 09:05:26 -0400 | [diff] [blame] | 1951 | DEFINE_EVENT(svc_deferred_event, svc_defer_##name, \ |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 1952 | TP_PROTO( \ |
| 1953 | const struct svc_deferred_req *dr \ |
| 1954 | ), \ |
| 1955 | TP_ARGS(dr)) |
Trond Myklebust | 104f635 | 2016-06-24 10:55:46 -0400 | [diff] [blame] | 1956 | |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 1957 | DEFINE_SVC_DEFERRED_EVENT(drop); |
Chuck Lever | 8954c5c | 2020-04-15 09:05:26 -0400 | [diff] [blame] | 1958 | DEFINE_SVC_DEFERRED_EVENT(queue); |
| 1959 | DEFINE_SVC_DEFERRED_EVENT(recv); |
Chuck Lever | dc5820b | 2018-12-19 11:00:16 -0500 | [diff] [blame] | 1960 | |
Chuck Lever | 998024d | 2020-03-17 15:06:31 -0400 | [diff] [blame] | 1961 | TRACE_EVENT(svcsock_new_socket, |
| 1962 | TP_PROTO( |
| 1963 | const struct socket *socket |
| 1964 | ), |
| 1965 | |
| 1966 | TP_ARGS(socket), |
| 1967 | |
| 1968 | TP_STRUCT__entry( |
| 1969 | __field(unsigned long, type) |
| 1970 | __field(unsigned long, family) |
| 1971 | __field(bool, listener) |
| 1972 | ), |
| 1973 | |
| 1974 | TP_fast_assign( |
| 1975 | __entry->type = socket->type; |
| 1976 | __entry->family = socket->sk->sk_family; |
| 1977 | __entry->listener = (socket->sk->sk_state == TCP_LISTEN); |
| 1978 | ), |
| 1979 | |
| 1980 | TP_printk("type=%s family=%s%s", |
| 1981 | show_socket_type(__entry->type), |
| 1982 | rpc_show_address_family(__entry->family), |
| 1983 | __entry->listener ? " (listener)" : "" |
| 1984 | ) |
| 1985 | ); |
| 1986 | |
Chuck Lever | a5cda73 | 2020-03-16 14:53:04 -0400 | [diff] [blame] | 1987 | TRACE_EVENT(svcsock_marker, |
| 1988 | TP_PROTO( |
| 1989 | const struct svc_xprt *xprt, |
| 1990 | __be32 marker |
| 1991 | ), |
| 1992 | |
| 1993 | TP_ARGS(xprt, marker), |
| 1994 | |
| 1995 | TP_STRUCT__entry( |
| 1996 | __field(unsigned int, length) |
| 1997 | __field(bool, last) |
| 1998 | __string(addr, xprt->xpt_remotebuf) |
| 1999 | ), |
| 2000 | |
| 2001 | TP_fast_assign( |
| 2002 | __entry->length = be32_to_cpu(marker) & RPC_FRAGMENT_SIZE_MASK; |
| 2003 | __entry->last = be32_to_cpu(marker) & RPC_LAST_STREAM_FRAGMENT; |
| 2004 | __assign_str(addr, xprt->xpt_remotebuf); |
| 2005 | ), |
| 2006 | |
| 2007 | TP_printk("addr=%s length=%u%s", __get_str(addr), |
| 2008 | __entry->length, __entry->last ? " (last)" : "") |
| 2009 | ); |
| 2010 | |
Chuck Lever | 998024d | 2020-03-17 15:06:31 -0400 | [diff] [blame] | 2011 | DECLARE_EVENT_CLASS(svcsock_class, |
| 2012 | TP_PROTO( |
| 2013 | const struct svc_xprt *xprt, |
| 2014 | ssize_t result |
| 2015 | ), |
| 2016 | |
| 2017 | TP_ARGS(xprt, result), |
| 2018 | |
| 2019 | TP_STRUCT__entry( |
| 2020 | __field(ssize_t, result) |
| 2021 | __field(unsigned long, flags) |
| 2022 | __string(addr, xprt->xpt_remotebuf) |
| 2023 | ), |
| 2024 | |
| 2025 | TP_fast_assign( |
| 2026 | __entry->result = result; |
| 2027 | __entry->flags = xprt->xpt_flags; |
| 2028 | __assign_str(addr, xprt->xpt_remotebuf); |
| 2029 | ), |
| 2030 | |
| 2031 | TP_printk("addr=%s result=%zd flags=%s", __get_str(addr), |
| 2032 | __entry->result, show_svc_xprt_flags(__entry->flags) |
| 2033 | ) |
| 2034 | ); |
| 2035 | |
| 2036 | #define DEFINE_SVCSOCK_EVENT(name) \ |
| 2037 | DEFINE_EVENT(svcsock_class, svcsock_##name, \ |
| 2038 | TP_PROTO( \ |
| 2039 | const struct svc_xprt *xprt, \ |
| 2040 | ssize_t result \ |
| 2041 | ), \ |
| 2042 | TP_ARGS(xprt, result)) |
| 2043 | |
| 2044 | DEFINE_SVCSOCK_EVENT(udp_send); |
Chuck Lever | fff1ebb | 2020-05-20 17:30:24 -0400 | [diff] [blame] | 2045 | DEFINE_SVCSOCK_EVENT(udp_recv); |
| 2046 | DEFINE_SVCSOCK_EVENT(udp_recv_err); |
Chuck Lever | 998024d | 2020-03-17 15:06:31 -0400 | [diff] [blame] | 2047 | DEFINE_SVCSOCK_EVENT(tcp_send); |
Chuck Lever | 7dae1dd | 2020-05-20 13:41:02 -0400 | [diff] [blame] | 2048 | DEFINE_SVCSOCK_EVENT(tcp_recv); |
Chuck Lever | 6be8c59 | 2020-05-20 12:29:13 -0400 | [diff] [blame] | 2049 | DEFINE_SVCSOCK_EVENT(tcp_recv_eagain); |
| 2050 | DEFINE_SVCSOCK_EVENT(tcp_recv_err); |
Chuck Lever | 998024d | 2020-03-17 15:06:31 -0400 | [diff] [blame] | 2051 | DEFINE_SVCSOCK_EVENT(data_ready); |
| 2052 | DEFINE_SVCSOCK_EVENT(write_space); |
| 2053 | |
Chuck Lever | 6be8c59 | 2020-05-20 12:29:13 -0400 | [diff] [blame] | 2054 | TRACE_EVENT(svcsock_tcp_recv_short, |
| 2055 | TP_PROTO( |
| 2056 | const struct svc_xprt *xprt, |
| 2057 | u32 expected, |
| 2058 | u32 received |
| 2059 | ), |
| 2060 | |
| 2061 | TP_ARGS(xprt, expected, received), |
| 2062 | |
| 2063 | TP_STRUCT__entry( |
| 2064 | __field(u32, expected) |
| 2065 | __field(u32, received) |
| 2066 | __field(unsigned long, flags) |
| 2067 | __string(addr, xprt->xpt_remotebuf) |
| 2068 | ), |
| 2069 | |
| 2070 | TP_fast_assign( |
| 2071 | __entry->expected = expected; |
| 2072 | __entry->received = received; |
| 2073 | __entry->flags = xprt->xpt_flags; |
| 2074 | __assign_str(addr, xprt->xpt_remotebuf); |
| 2075 | ), |
| 2076 | |
| 2077 | TP_printk("addr=%s flags=%s expected=%u received=%u", |
| 2078 | __get_str(addr), show_svc_xprt_flags(__entry->flags), |
| 2079 | __entry->expected, __entry->received |
| 2080 | ) |
| 2081 | ); |
| 2082 | |
Chuck Lever | a0469f4 | 2020-03-18 11:20:50 -0400 | [diff] [blame] | 2083 | TRACE_EVENT(svcsock_tcp_state, |
| 2084 | TP_PROTO( |
| 2085 | const struct svc_xprt *xprt, |
| 2086 | const struct socket *socket |
| 2087 | ), |
| 2088 | |
| 2089 | TP_ARGS(xprt, socket), |
| 2090 | |
| 2091 | TP_STRUCT__entry( |
| 2092 | __field(unsigned long, socket_state) |
| 2093 | __field(unsigned long, sock_state) |
| 2094 | __field(unsigned long, flags) |
| 2095 | __string(addr, xprt->xpt_remotebuf) |
| 2096 | ), |
| 2097 | |
| 2098 | TP_fast_assign( |
| 2099 | __entry->socket_state = socket->state; |
| 2100 | __entry->sock_state = socket->sk->sk_state; |
| 2101 | __entry->flags = xprt->xpt_flags; |
| 2102 | __assign_str(addr, xprt->xpt_remotebuf); |
| 2103 | ), |
| 2104 | |
| 2105 | TP_printk("addr=%s state=%s sk_state=%s flags=%s", __get_str(addr), |
| 2106 | rpc_show_socket_state(__entry->socket_state), |
| 2107 | rpc_show_sock_state(__entry->sock_state), |
| 2108 | show_svc_xprt_flags(__entry->flags) |
| 2109 | ) |
| 2110 | ); |
| 2111 | |
| 2112 | DECLARE_EVENT_CLASS(svcsock_accept_class, |
| 2113 | TP_PROTO( |
| 2114 | const struct svc_xprt *xprt, |
| 2115 | const char *service, |
| 2116 | long status |
| 2117 | ), |
| 2118 | |
| 2119 | TP_ARGS(xprt, service, status), |
| 2120 | |
| 2121 | TP_STRUCT__entry( |
| 2122 | __field(long, status) |
| 2123 | __string(service, service) |
| 2124 | __array(unsigned char, addr, sizeof(struct sockaddr_in6)) |
| 2125 | ), |
| 2126 | |
| 2127 | TP_fast_assign( |
| 2128 | __entry->status = status; |
| 2129 | __assign_str(service, service); |
| 2130 | memcpy(__entry->addr, &xprt->xpt_local, sizeof(__entry->addr)); |
| 2131 | ), |
| 2132 | |
| 2133 | TP_printk("listener=%pISpc service=%s status=%ld", |
| 2134 | __entry->addr, __get_str(service), __entry->status |
| 2135 | ) |
| 2136 | ); |
| 2137 | |
| 2138 | #define DEFINE_ACCEPT_EVENT(name) \ |
| 2139 | DEFINE_EVENT(svcsock_accept_class, svcsock_##name##_err, \ |
| 2140 | TP_PROTO( \ |
| 2141 | const struct svc_xprt *xprt, \ |
| 2142 | const char *service, \ |
| 2143 | long status \ |
| 2144 | ), \ |
| 2145 | TP_ARGS(xprt, service, status)) |
| 2146 | |
| 2147 | DEFINE_ACCEPT_EVENT(accept); |
| 2148 | DEFINE_ACCEPT_EVENT(getpeername); |
| 2149 | |
Trond Myklebust | 78a947f | 2020-03-01 18:21:44 -0500 | [diff] [blame] | 2150 | DECLARE_EVENT_CLASS(cache_event, |
| 2151 | TP_PROTO( |
| 2152 | const struct cache_detail *cd, |
| 2153 | const struct cache_head *h |
| 2154 | ), |
| 2155 | |
| 2156 | TP_ARGS(cd, h), |
| 2157 | |
| 2158 | TP_STRUCT__entry( |
| 2159 | __field(const struct cache_head *, h) |
| 2160 | __string(name, cd->name) |
| 2161 | ), |
| 2162 | |
| 2163 | TP_fast_assign( |
| 2164 | __entry->h = h; |
| 2165 | __assign_str(name, cd->name); |
| 2166 | ), |
| 2167 | |
| 2168 | TP_printk("cache=%s entry=%p", __get_str(name), __entry->h) |
| 2169 | ); |
| 2170 | #define DEFINE_CACHE_EVENT(name) \ |
| 2171 | DEFINE_EVENT(cache_event, name, \ |
| 2172 | TP_PROTO( \ |
| 2173 | const struct cache_detail *cd, \ |
| 2174 | const struct cache_head *h \ |
| 2175 | ), \ |
| 2176 | TP_ARGS(cd, h)) |
| 2177 | DEFINE_CACHE_EVENT(cache_entry_expired); |
| 2178 | DEFINE_CACHE_EVENT(cache_entry_upcall); |
| 2179 | DEFINE_CACHE_EVENT(cache_entry_update); |
| 2180 | DEFINE_CACHE_EVENT(cache_entry_make_negative); |
| 2181 | DEFINE_CACHE_EVENT(cache_entry_no_listener); |
| 2182 | |
Chuck Lever | b4af593 | 2020-05-02 11:59:37 -0400 | [diff] [blame] | 2183 | DECLARE_EVENT_CLASS(register_class, |
| 2184 | TP_PROTO( |
| 2185 | const char *program, |
| 2186 | const u32 version, |
| 2187 | const int family, |
| 2188 | const unsigned short protocol, |
| 2189 | const unsigned short port, |
| 2190 | int error |
| 2191 | ), |
| 2192 | |
| 2193 | TP_ARGS(program, version, family, protocol, port, error), |
| 2194 | |
| 2195 | TP_STRUCT__entry( |
| 2196 | __field(u32, version) |
| 2197 | __field(unsigned long, family) |
| 2198 | __field(unsigned short, protocol) |
| 2199 | __field(unsigned short, port) |
| 2200 | __field(int, error) |
| 2201 | __string(program, program) |
| 2202 | ), |
| 2203 | |
| 2204 | TP_fast_assign( |
| 2205 | __entry->version = version; |
| 2206 | __entry->family = family; |
| 2207 | __entry->protocol = protocol; |
| 2208 | __entry->port = port; |
| 2209 | __entry->error = error; |
| 2210 | __assign_str(program, program); |
| 2211 | ), |
| 2212 | |
| 2213 | TP_printk("program=%sv%u proto=%s port=%u family=%s error=%d", |
| 2214 | __get_str(program), __entry->version, |
| 2215 | __entry->protocol == IPPROTO_UDP ? "udp" : "tcp", |
| 2216 | __entry->port, rpc_show_address_family(__entry->family), |
| 2217 | __entry->error |
| 2218 | ) |
| 2219 | ); |
| 2220 | |
| 2221 | #define DEFINE_REGISTER_EVENT(name) \ |
| 2222 | DEFINE_EVENT(register_class, svc_##name, \ |
| 2223 | TP_PROTO( \ |
| 2224 | const char *program, \ |
| 2225 | const u32 version, \ |
| 2226 | const int family, \ |
| 2227 | const unsigned short protocol, \ |
| 2228 | const unsigned short port, \ |
| 2229 | int error \ |
| 2230 | ), \ |
| 2231 | TP_ARGS(program, version, family, protocol, \ |
| 2232 | port, error)) |
| 2233 | |
| 2234 | DEFINE_REGISTER_EVENT(register); |
| 2235 | DEFINE_REGISTER_EVENT(noregister); |
| 2236 | |
| 2237 | TRACE_EVENT(svc_unregister, |
| 2238 | TP_PROTO( |
| 2239 | const char *program, |
| 2240 | const u32 version, |
| 2241 | int error |
| 2242 | ), |
| 2243 | |
| 2244 | TP_ARGS(program, version, error), |
| 2245 | |
| 2246 | TP_STRUCT__entry( |
| 2247 | __field(u32, version) |
| 2248 | __field(int, error) |
| 2249 | __string(program, program) |
| 2250 | ), |
| 2251 | |
| 2252 | TP_fast_assign( |
| 2253 | __entry->version = version; |
| 2254 | __entry->error = error; |
| 2255 | __assign_str(program, program); |
| 2256 | ), |
| 2257 | |
| 2258 | TP_printk("program=%sv%u error=%d", |
| 2259 | __get_str(program), __entry->version, __entry->error |
| 2260 | ) |
| 2261 | ); |
| 2262 | |
Trond Myklebust | 82b0a4c | 2012-01-20 14:52:23 -0500 | [diff] [blame] | 2263 | #endif /* _TRACE_SUNRPC_H */ |
| 2264 | |
| 2265 | #include <trace/define_trace.h> |