1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM sunrpc
5 #if !defined(_TRACE_SUNRPC_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_SUNRPC_H
8 #include <linux/sunrpc/sched.h>
9 #include <linux/sunrpc/clnt.h>
10 #include <linux/sunrpc/svc.h>
11 #include <linux/sunrpc/xprtsock.h>
12 #include <linux/sunrpc/svc_xprt.h>
13 #include <net/tcp_states.h>
14 #include <linux/net.h>
15 #include <linux/tracepoint.h>
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
);
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" })
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
);
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" })
50 DECLARE_EVENT_CLASS(rpc_xdr_buf_class
,
52 const struct rpc_task
*task
,
53 const struct xdr_buf
*xdr
59 __field(unsigned int, task_id
)
60 __field(unsigned int, client_id
)
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
)
70 __entry
->task_id
= task
->tk_pid
;
71 __entry
->client_id
= task
->tk_client
?
72 task
->tk_client
->cl_clid
: -1;
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
;
81 TP_printk("task:%u@%u head=[%p,%zu] page=%u tail=[%p,%zu] len=%u",
82 __entry
->task_id
, __entry
->client_id
,
83 __entry
->head_base
, __entry
->head_len
, __entry
->page_len
,
84 __entry
->tail_base
, __entry
->tail_len
, __entry
->msg_len
88 #define DEFINE_RPCXDRBUF_EVENT(name) \
89 DEFINE_EVENT(rpc_xdr_buf_class, \
92 const struct rpc_task *task, \
93 const struct xdr_buf *xdr \
97 DEFINE_RPCXDRBUF_EVENT(sendto
);
98 DEFINE_RPCXDRBUF_EVENT(recvfrom
);
99 DEFINE_RPCXDRBUF_EVENT(reply_pages
);
102 DECLARE_EVENT_CLASS(rpc_clnt_class
,
104 const struct rpc_clnt
*clnt
110 __field(unsigned int, client_id
)
114 __entry
->client_id
= clnt
->cl_clid
;
117 TP_printk("clid=%u", __entry
->client_id
)
120 #define DEFINE_RPC_CLNT_EVENT(name) \
121 DEFINE_EVENT(rpc_clnt_class, \
124 const struct rpc_clnt *clnt \
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
);
135 TRACE_EVENT(rpc_clnt_new
,
137 const struct rpc_clnt
*clnt
,
138 const struct rpc_xprt
*xprt
,
143 TP_ARGS(clnt
, xprt
, program
, server
),
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
)
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
]);
157 __assign_str(program
, program
);
158 __assign_str(server
, server
);
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
))
166 TRACE_EVENT(rpc_clnt_new_err
,
173 TP_ARGS(program
, server
, error
),
177 __string(program
, program
)
178 __string(server
, server
)
182 __entry
->error
= error
;
183 __assign_str(program
, program
);
184 __assign_str(server
, server
);
187 TP_printk("program=%s server=%s error=%d",
188 __get_str(program
), __get_str(server
), __entry
->error
)
191 TRACE_EVENT(rpc_clnt_clone_err
,
193 const struct rpc_clnt
*clnt
,
197 TP_ARGS(clnt
, error
),
200 __field(unsigned int, client_id
)
205 __entry
->client_id
= clnt
->cl_clid
;
206 __entry
->error
= error
;
209 TP_printk("client=%u error=%d", __entry
->client_id
, __entry
->error
)
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
);
222 #define rpc_show_auth_stat(status) \
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" }) \
233 DECLARE_EVENT_CLASS(rpc_task_status,
235 TP_PROTO(const struct rpc_task
*task
),
240 __field(unsigned int, task_id
)
241 __field(unsigned int, client_id
)
246 __entry
->task_id
= task
->tk_pid
;
247 __entry
->client_id
= task
->tk_client
->cl_clid
;
248 __entry
->status
= task
->tk_status
;
251 TP_printk("task:%u@%u status=%d",
252 __entry
->task_id
, __entry
->client_id
,
255 #define DEFINE_RPC_STATUS_EVENT(name) \
256 DEFINE_EVENT(rpc_task_status, rpc_##name##_status, \
258 const struct rpc_task *task \
262 DEFINE_RPC_STATUS_EVENT(call
);
263 DEFINE_RPC_STATUS_EVENT(connect
);
264 DEFINE_RPC_STATUS_EVENT(timeout
);
265 DEFINE_RPC_STATUS_EVENT(retry_refresh
);
266 DEFINE_RPC_STATUS_EVENT(refresh
);
268 TRACE_EVENT(rpc_request
,
269 TP_PROTO(const struct rpc_task
*task
),
274 __field(unsigned int, task_id
)
275 __field(unsigned int, client_id
)
276 __field(int, version
)
278 __string(progname
, task
->tk_client
->cl_program
->name
)
279 __string(procname
, rpc_proc_name(task
))
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
);
287 __assign_str(progname
, task
->tk_client
->cl_program
->name
);
288 __assign_str(procname
, rpc_proc_name(task
));
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": ""
298 #define rpc_show_task_flags(flags) \
299 __print_flags(flags, "|", \
300 { RPC_TASK_ASYNC, "ASYNC" }, \
301 { RPC_TASK_SWAPPER, "SWAPPER" }, \
302 { RPC_TASK_MOVEABLE, "MOVEABLE" }, \
303 { RPC_TASK_NULLCREDS, "NULLCREDS" }, \
304 { RPC_CALL_MAJORSEEN, "MAJORSEEN" }, \
305 { RPC_TASK_ROOTCREDS, "ROOTCREDS" }, \
306 { RPC_TASK_DYNAMIC, "DYNAMIC" }, \
307 { RPC_TASK_NO_ROUND_ROBIN, "NO_ROUND_ROBIN" }, \
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" }, \
313 { RPC_TASK_NO_RETRANS_TIMEOUT, "NORTO" }, \
314 { RPC_TASK_CRED_NOREF, "CRED_NOREF" })
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" }, \
323 { (1UL << RPC_TASK_MSG_PIN_WAIT), "MSG_PIN_WAIT" }, \
324 { (1UL << RPC_TASK_SIGNALLED), "SIGNALLED" })
326 DECLARE_EVENT_CLASS(rpc_task_running
,
328 TP_PROTO(const struct rpc_task
*task
, const void *action
),
330 TP_ARGS(task
, action
),
333 __field(unsigned int, task_id
)
334 __field(unsigned int, client_id
)
335 __field(const void *, action
)
336 __field(unsigned long, runstate
)
338 __field(unsigned short, flags
)
342 __entry
->client_id
= task
->tk_client
?
343 task
->tk_client
->cl_clid
: -1;
344 __entry
->task_id
= task
->tk_pid
;
345 __entry
->action
= action
;
346 __entry
->runstate
= task
->tk_runstate
;
347 __entry
->status
= task
->tk_status
;
348 __entry
->flags
= task
->tk_flags
;
351 TP_printk("task:%u@%d flags=%s runstate=%s status=%d action=%ps",
352 __entry
->task_id
, __entry
->client_id
,
353 rpc_show_task_flags(__entry
->flags
),
354 rpc_show_runstate(__entry
->runstate
),
359 #define DEFINE_RPC_RUNNING_EVENT(name) \
360 DEFINE_EVENT(rpc_task_running, rpc_task_##name, \
362 const struct rpc_task *task, \
365 TP_ARGS(task, action))
367 DEFINE_RPC_RUNNING_EVENT(begin
);
368 DEFINE_RPC_RUNNING_EVENT(run_action
);
369 DEFINE_RPC_RUNNING_EVENT(sync_sleep
);
370 DEFINE_RPC_RUNNING_EVENT(sync_wake
);
371 DEFINE_RPC_RUNNING_EVENT(complete
);
372 DEFINE_RPC_RUNNING_EVENT(timeout
);
373 DEFINE_RPC_RUNNING_EVENT(signalled
);
374 DEFINE_RPC_RUNNING_EVENT(end
);
376 DECLARE_EVENT_CLASS(rpc_task_queued
,
378 TP_PROTO(const struct rpc_task
*task
, const struct rpc_wait_queue
*q
),
383 __field(unsigned int, task_id
)
384 __field(unsigned int, client_id
)
385 __field(unsigned long, timeout
)
386 __field(unsigned long, runstate
)
388 __field(unsigned short, flags
)
389 __string(q_name
, rpc_qname(q
))
393 __entry
->client_id
= task
->tk_client
?
394 task
->tk_client
->cl_clid
: -1;
395 __entry
->task_id
= task
->tk_pid
;
396 __entry
->timeout
= rpc_task_timeout(task
);
397 __entry
->runstate
= task
->tk_runstate
;
398 __entry
->status
= task
->tk_status
;
399 __entry
->flags
= task
->tk_flags
;
400 __assign_str(q_name
, rpc_qname(q
));
403 TP_printk("task:%u@%d flags=%s runstate=%s status=%d timeout=%lu queue=%s",
404 __entry
->task_id
, __entry
->client_id
,
405 rpc_show_task_flags(__entry
->flags
),
406 rpc_show_runstate(__entry
->runstate
),
412 #define DEFINE_RPC_QUEUED_EVENT(name) \
413 DEFINE_EVENT(rpc_task_queued, rpc_task_##name, \
415 const struct rpc_task *task, \
416 const struct rpc_wait_queue *q \
420 DEFINE_RPC_QUEUED_EVENT(sleep
);
421 DEFINE_RPC_QUEUED_EVENT(wakeup
);
423 DECLARE_EVENT_CLASS(rpc_failure
,
425 TP_PROTO(const struct rpc_task
*task
),
430 __field(unsigned int, task_id
)
431 __field(unsigned int, client_id
)
435 __entry
->task_id
= task
->tk_pid
;
436 __entry
->client_id
= task
->tk_client
->cl_clid
;
439 TP_printk("task:%u@%u",
440 __entry
->task_id
, __entry
->client_id
)
443 #define DEFINE_RPC_FAILURE(name) \
444 DEFINE_EVENT(rpc_failure, rpc_bad_##name, \
446 const struct rpc_task *task \
450 DEFINE_RPC_FAILURE(callhdr
);
451 DEFINE_RPC_FAILURE(verifier
);
453 DECLARE_EVENT_CLASS(rpc_reply_event
,
456 const struct rpc_task
*task
462 __field(unsigned int, task_id
)
463 __field(unsigned int, client_id
)
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
)
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
);
475 __assign_str(progname
, task
->tk_client
->cl_program
->name
);
476 __entry
->version
= task
->tk_client
->cl_vers
;
477 __assign_str(procname
, rpc_proc_name(task
));
478 __assign_str(servername
, task
->tk_xprt
->servername
);
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
,
487 #define DEFINE_RPC_REPLY_EVENT(name) \
488 DEFINE_EVENT(rpc_reply_event, rpc__##name, \
490 const struct rpc_task *task \
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
);
504 #define DEFINE_RPCB_ERROR_EVENT(name) \
505 DEFINE_EVENT(rpc_reply_event, rpcb_##name##_err, \
507 const struct rpc_task *task \
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
);
517 TRACE_EVENT(rpc_buf_alloc
,
519 const struct rpc_task
*task
,
523 TP_ARGS(task
, status
),
526 __field(unsigned int, task_id
)
527 __field(unsigned int, client_id
)
528 __field(size_t, callsize
)
529 __field(size_t, recvsize
)
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
;
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
547 TRACE_EVENT(rpc_call_rpcerror
,
549 const struct rpc_task
*task
,
554 TP_ARGS(task
, tk_status
, rpc_status
),
557 __field(unsigned int, task_id
)
558 __field(unsigned int, client_id
)
559 __field(int, tk_status
)
560 __field(int, rpc_status
)
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
;
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
)
575 TRACE_EVENT(rpc_stats_latency
,
578 const struct rpc_task
*task
,
584 TP_ARGS(task
, backlog
, rtt
, execute
),
587 __field(unsigned int, task_id
)
588 __field(unsigned int, client_id
)
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
)
599 __entry
->client_id
= task
->tk_client
->cl_clid
;
600 __entry
->task_id
= task
->tk_pid
;
601 __entry
->xid
= be32_to_cpu(task
->tk_rqstp
->rq_xid
);
602 __entry
->version
= task
->tk_client
->cl_vers
;
603 __assign_str(progname
, task
->tk_client
->cl_program
->name
);
604 __assign_str(procname
, rpc_proc_name(task
));
605 __entry
->backlog
= ktime_to_us(backlog
);
606 __entry
->rtt
= ktime_to_us(rtt
);
607 __entry
->execute
= ktime_to_us(execute
);
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
,
612 __get_str(progname
), __entry
->version
, __get_str(procname
),
613 __entry
->backlog
, __entry
->rtt
, __entry
->execute
)
616 TRACE_EVENT(rpc_xdr_overflow
,
618 const struct xdr_stream
*xdr
,
622 TP_ARGS(xdr
, requested
),
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
)
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")
645 const struct rpc_task
*task
= xdr
->rqst
->rq_task
;
647 __entry
->task_id
= task
->tk_pid
;
648 __entry
->client_id
= task
->tk_client
->cl_clid
;
649 __assign_str(progname
,
650 task
->tk_client
->cl_program
->name
);
651 __entry
->version
= task
->tk_client
->cl_vers
;
652 __assign_str(procedure
, task
->tk_msg
.rpc_proc
->p_name
);
654 __entry
->task_id
= 0;
655 __entry
->client_id
= 0;
656 __assign_str(progname
, "unknown");
657 __entry
->version
= 0;
658 __assign_str(procedure
, "unknown");
660 __entry
->requested
= requested
;
661 __entry
->end
= xdr
->end
;
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
;
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
,
678 __entry
->tail_base
, __entry
->tail_len
,
683 TRACE_EVENT(rpc_xdr_alignment
,
685 const struct xdr_stream
*xdr
,
690 TP_ARGS(xdr
, offset
, copied
),
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
)
705 xdr
->rqst
->rq_task
->tk_client
->cl_program
->name
)
707 xdr
->rqst
->rq_task
->tk_msg
.rpc_proc
->p_name
)
711 const struct rpc_task
*task
= xdr
->rqst
->rq_task
;
713 __entry
->task_id
= task
->tk_pid
;
714 __entry
->client_id
= task
->tk_client
->cl_clid
;
715 __assign_str(progname
,
716 task
->tk_client
->cl_program
->name
);
717 __entry
->version
= task
->tk_client
->cl_vers
;
718 __assign_str(procedure
, task
->tk_msg
.rpc_proc
->p_name
);
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
;
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
,
737 __entry
->tail_base
, __entry
->tail_len
,
743 * First define the enums in the below macros to be exported to userspace
744 * via TRACE_DEFINE_ENUM().
748 #define EM(a, b) TRACE_DEFINE_ENUM(a);
749 #define EMe(a, b) TRACE_DEFINE_ENUM(a);
751 #define RPC_SHOW_SOCKET \
752 EM( SS_FREE, "FREE" ) \
753 EM( SS_UNCONNECTED, "UNCONNECTED" ) \
754 EM( SS_CONNECTING, "CONNECTING" ) \
755 EM( SS_CONNECTED, "CONNECTED" ) \
756 EMe( SS_DISCONNECTING, "DISCONNECTING" )
758 #define rpc_show_socket_state(state) \
759 __print_symbolic(state, RPC_SHOW_SOCKET)
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" )
776 #define rpc_show_sock_state(state) \
777 __print_symbolic(state, RPC_SHOW_SOCK)
782 * Now redefine the EM() and EMe() macros to map the enums to the strings
783 * that will be printed in the output.
787 #define EM(a, b) {a, b},
788 #define EMe(a, b) {a, b}
790 DECLARE_EVENT_CLASS(xs_socket_event
,
793 struct rpc_xprt
*xprt
,
794 struct socket
*socket
797 TP_ARGS(xprt
, socket
),
800 __field(unsigned int, socket_state
)
801 __field(unsigned int, sock_state
)
802 __field(unsigned long long, ino
)
804 xprt
->address_strings
[RPC_DISPLAY_ADDR
])
806 xprt
->address_strings
[RPC_DISPLAY_PORT
])
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
]);
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
),
827 rpc_show_sock_state(__entry
->sock_state
)
830 #define DEFINE_RPC_SOCKET_EVENT(name) \
831 DEFINE_EVENT(xs_socket_event, name, \
833 struct rpc_xprt *xprt, \
834 struct socket *socket \
836 TP_ARGS(xprt, socket))
838 DECLARE_EVENT_CLASS(xs_socket_event_done
,
841 struct rpc_xprt
*xprt
,
842 struct socket
*socket
,
846 TP_ARGS(xprt
, socket
, error
),
850 __field(unsigned int, socket_state
)
851 __field(unsigned int, sock_state
)
852 __field(unsigned long long, ino
)
854 xprt
->address_strings
[RPC_DISPLAY_ADDR
])
856 xprt
->address_strings
[RPC_DISPLAY_PORT
])
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
]);
872 "error=%d socket:[%llu] dstaddr=%s/%s "
873 "state=%u (%s) sk_state=%u (%s)",
875 __entry
->ino
, __get_str(dstaddr
), __get_str(dstport
),
876 __entry
->socket_state
,
877 rpc_show_socket_state(__entry
->socket_state
),
879 rpc_show_sock_state(__entry
->sock_state
)
882 #define DEFINE_RPC_SOCKET_EVENT_DONE(name) \
883 DEFINE_EVENT(xs_socket_event_done, name, \
885 struct rpc_xprt *xprt, \
886 struct socket *socket, \
889 TP_ARGS(xprt, socket, error))
891 DEFINE_RPC_SOCKET_EVENT(rpc_socket_state_change
);
892 DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_connect
);
893 DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_error
);
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
);
898 TRACE_EVENT(rpc_socket_nospace
,
900 const struct rpc_rqst
*rqst
,
901 const struct sock_xprt
*transport
904 TP_ARGS(rqst
, transport
),
907 __field(unsigned int, task_id
)
908 __field(unsigned int, client_id
)
909 __field(unsigned int, total
)
910 __field(unsigned int, remaining
)
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
;
920 TP_printk("task:%u@%u total=%u remaining=%u",
921 __entry
->task_id
, __entry
->client_id
,
922 __entry
->total
, __entry
->remaining
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"}, \
935 { (1UL << XPRT_OFFLINE), "OFFLINE"}, \
936 { (1UL << XPRT_REMOVE), "REMOVE"}, \
937 { (1UL << XPRT_CONGESTED), "CONGESTED"}, \
938 { (1UL << XPRT_CWND_WAIT), "CWND_WAIT"}, \
939 { (1UL << XPRT_WRITE_SPACE), "WRITE_SPACE"})
941 DECLARE_EVENT_CLASS(rpc_xprt_lifetime_class
,
943 const struct rpc_xprt
*xprt
949 __field(unsigned long, state
)
950 __string(addr
, xprt
->address_strings
[RPC_DISPLAY_ADDR
])
951 __string(port
, xprt
->address_strings
[RPC_DISPLAY_PORT
])
955 __entry
->state
= xprt
->state
;
956 __assign_str(addr
, xprt
->address_strings
[RPC_DISPLAY_ADDR
]);
957 __assign_str(port
, xprt
->address_strings
[RPC_DISPLAY_PORT
]);
960 TP_printk("peer=[%s]:%s state=%s",
961 __get_str(addr
), __get_str(port
),
962 rpc_show_xprt_state(__entry
->state
))
965 #define DEFINE_RPC_XPRT_LIFETIME_EVENT(name) \
966 DEFINE_EVENT(rpc_xprt_lifetime_class, \
969 const struct rpc_xprt *xprt \
973 DEFINE_RPC_XPRT_LIFETIME_EVENT(create
);
974 DEFINE_RPC_XPRT_LIFETIME_EVENT(connect
);
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
);
981 DECLARE_EVENT_CLASS(rpc_xprt_event
,
983 const struct rpc_xprt
*xprt
,
988 TP_ARGS(xprt
, xid
, status
),
993 __string(addr
, xprt
->address_strings
[RPC_DISPLAY_ADDR
])
994 __string(port
, xprt
->address_strings
[RPC_DISPLAY_PORT
])
998 __entry
->xid
= be32_to_cpu(xid
);
999 __entry
->status
= status
;
1000 __assign_str(addr
, xprt
->address_strings
[RPC_DISPLAY_ADDR
]);
1001 __assign_str(port
, xprt
->address_strings
[RPC_DISPLAY_PORT
]);
1004 TP_printk("peer=[%s]:%s xid=0x%08x status=%d", __get_str(addr
),
1005 __get_str(port
), __entry
->xid
,
1008 #define DEFINE_RPC_XPRT_EVENT(name) \
1009 DEFINE_EVENT(rpc_xprt_event, xprt_##name, \
1011 const struct rpc_xprt *xprt, \
1015 TP_ARGS(xprt, xid, status))
1017 DEFINE_RPC_XPRT_EVENT(timer
);
1018 DEFINE_RPC_XPRT_EVENT(lookup_rqst
);
1020 TRACE_EVENT(xprt_transmit
,
1022 const struct rpc_rqst
*rqst
,
1026 TP_ARGS(rqst
, status
),
1029 __field(unsigned int, task_id
)
1030 __field(unsigned int, client_id
)
1033 __field(int, status
)
1037 __entry
->task_id
= rqst
->rq_task
->tk_pid
;
1038 __entry
->client_id
= rqst
->rq_task
->tk_client
?
1039 rqst
->rq_task
->tk_client
->cl_clid
: -1;
1040 __entry
->xid
= be32_to_cpu(rqst
->rq_xid
);
1041 __entry
->seqno
= rqst
->rq_seqno
;
1042 __entry
->status
= status
;
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
)
1051 TRACE_EVENT(xprt_retransmit
,
1053 const struct rpc_rqst
*rqst
1059 __field(unsigned int, task_id
)
1060 __field(unsigned int, client_id
)
1062 __field(int, ntrans
)
1063 __field(int, version
)
1064 __field(unsigned long, timeout
)
1066 rqst
->rq_task
->tk_client
->cl_program
->name
)
1067 __string(procname
, rpc_proc_name(rqst
->rq_task
))
1071 struct rpc_task
*task
= rqst
->rq_task
;
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
;
1078 __entry
->timeout
= task
->tk_timeout
;
1079 __assign_str(progname
,
1080 task
->tk_client
->cl_program
->name
);
1081 __entry
->version
= task
->tk_client
->cl_vers
;
1082 __assign_str(procname
, rpc_proc_name(task
));
1086 "task:%u@%u xid=0x%08x %sv%d %s ntrans=%d timeout=%lu",
1087 __entry
->task_id
, __entry
->client_id
, __entry
->xid
,
1088 __get_str(progname
), __entry
->version
, __get_str(procname
),
1089 __entry
->ntrans
, __entry
->timeout
1093 TRACE_EVENT(xprt_ping
,
1094 TP_PROTO(const struct rpc_xprt
*xprt
, int status
),
1096 TP_ARGS(xprt
, status
),
1099 __field(int, status
)
1100 __string(addr
, xprt
->address_strings
[RPC_DISPLAY_ADDR
])
1101 __string(port
, xprt
->address_strings
[RPC_DISPLAY_PORT
])
1105 __entry
->status
= status
;
1106 __assign_str(addr
, xprt
->address_strings
[RPC_DISPLAY_ADDR
]);
1107 __assign_str(port
, xprt
->address_strings
[RPC_DISPLAY_PORT
]);
1110 TP_printk("peer=[%s]:%s status=%d",
1111 __get_str(addr
), __get_str(port
), __entry
->status
)
1114 DECLARE_EVENT_CLASS(xprt_writelock_event
,
1116 const struct rpc_xprt
*xprt
, const struct rpc_task
*task
1119 TP_ARGS(xprt
, task
),
1122 __field(unsigned int, task_id
)
1123 __field(unsigned int, client_id
)
1124 __field(unsigned int, snd_task_id
)
1129 __entry
->task_id
= task
->tk_pid
;
1130 __entry
->client_id
= task
->tk_client
?
1131 task
->tk_client
->cl_clid
: -1;
1133 __entry
->task_id
= -1;
1134 __entry
->client_id
= -1;
1136 __entry
->snd_task_id
= xprt
->snd_task
?
1137 xprt
->snd_task
->tk_pid
: -1;
1140 TP_printk("task:%u@%u snd_task:%u",
1141 __entry
->task_id
, __entry
->client_id
,
1142 __entry
->snd_task_id
)
1145 #define DEFINE_WRITELOCK_EVENT(name) \
1146 DEFINE_EVENT(xprt_writelock_event, xprt_##name, \
1148 const struct rpc_xprt *xprt, \
1149 const struct rpc_task *task \
1151 TP_ARGS(xprt, task))
1153 DEFINE_WRITELOCK_EVENT(reserve_xprt
);
1154 DEFINE_WRITELOCK_EVENT(release_xprt
);
1156 DECLARE_EVENT_CLASS(xprt_cong_event
,
1158 const struct rpc_xprt
*xprt
, const struct rpc_task
*task
1161 TP_ARGS(xprt
, task
),
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
)
1174 __entry
->task_id
= task
->tk_pid
;
1175 __entry
->client_id
= task
->tk_client
?
1176 task
->tk_client
->cl_clid
: -1;
1178 __entry
->task_id
= -1;
1179 __entry
->client_id
= -1;
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
);
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)" : "")
1194 #define DEFINE_CONG_EVENT(name) \
1195 DEFINE_EVENT(xprt_cong_event, xprt_##name, \
1197 const struct rpc_xprt *xprt, \
1198 const struct rpc_task *task \
1200 TP_ARGS(xprt, task))
1202 DEFINE_CONG_EVENT(reserve_cong
);
1203 DEFINE_CONG_EVENT(release_cong
);
1204 DEFINE_CONG_EVENT(get_cong
);
1205 DEFINE_CONG_EVENT(put_cong
);
1207 TRACE_EVENT(xprt_reserve
,
1209 const struct rpc_rqst
*rqst
1215 __field(unsigned int, task_id
)
1216 __field(unsigned int, client_id
)
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
);
1226 TP_printk("task:%u@%u xid=0x%08x",
1227 __entry
->task_id
, __entry
->client_id
, __entry
->xid
1231 TRACE_EVENT(xs_stream_read_data
,
1232 TP_PROTO(struct rpc_xprt
*xprt
, ssize_t err
, size_t total
),
1234 TP_ARGS(xprt
, err
, total
),
1237 __field(ssize_t
, err
)
1238 __field(size_t, total
)
1239 __string(addr
, xprt
? xprt
->address_strings
[RPC_DISPLAY_ADDR
] :
1241 __string(port
, xprt
? xprt
->address_strings
[RPC_DISPLAY_PORT
] :
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)");
1254 TP_printk("peer=[%s]:%s err=%zd total=%zu", __get_str(addr
),
1255 __get_str(port
), __entry
->err
, __entry
->total
)
1258 TRACE_EVENT(xs_stream_read_request
,
1259 TP_PROTO(struct sock_xprt
*xs
),
1264 __string(addr
, xs
->xprt
.address_strings
[RPC_DISPLAY_ADDR
])
1265 __string(port
, xs
->xprt
.address_strings
[RPC_DISPLAY_PORT
])
1267 __field(unsigned long, copied
)
1268 __field(unsigned int, reclen
)
1269 __field(unsigned int, offset
)
1273 __assign_str(addr
, xs
->xprt
.address_strings
[RPC_DISPLAY_ADDR
]);
1274 __assign_str(port
, xs
->xprt
.address_strings
[RPC_DISPLAY_PORT
]);
1275 __entry
->xid
= be32_to_cpu(xs
->recv
.xid
);
1276 __entry
->copied
= xs
->recv
.copied
;
1277 __entry
->reclen
= xs
->recv
.len
;
1278 __entry
->offset
= xs
->recv
.offset
;
1281 TP_printk("peer=[%s]:%s xid=0x%08x copied=%lu reclen=%u offset=%u",
1282 __get_str(addr
), __get_str(port
), __entry
->xid
,
1283 __entry
->copied
, __entry
->reclen
, __entry
->offset
)
1286 TRACE_EVENT(rpcb_getport
,
1288 const struct rpc_clnt
*clnt
,
1289 const struct rpc_task
*task
,
1290 unsigned int bind_version
1293 TP_ARGS(clnt
, task
, bind_version
),
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
)
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
);
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
1322 TRACE_EVENT(rpcb_setport
,
1324 const struct rpc_task
*task
,
1329 TP_ARGS(task
, status
, port
),
1332 __field(unsigned int, task_id
)
1333 __field(unsigned int, client_id
)
1334 __field(int, status
)
1335 __field(unsigned short, port
)
1339 __entry
->task_id
= task
->tk_pid
;
1340 __entry
->client_id
= task
->tk_client
->cl_clid
;
1341 __entry
->status
= status
;
1342 __entry
->port
= port
;
1345 TP_printk("task:%u@%u status=%d port=%u",
1346 __entry
->task_id
, __entry
->client_id
,
1347 __entry
->status
, __entry
->port
1351 TRACE_EVENT(pmap_register
,
1359 TP_ARGS(program
, version
, protocol
, port
),
1362 __field(unsigned int, program
)
1363 __field(unsigned int, version
)
1364 __field(int, protocol
)
1365 __field(unsigned int, port
)
1369 __entry
->program
= program
;
1370 __entry
->version
= version
;
1371 __entry
->protocol
= protocol
;
1372 __entry
->port
= port
;
1375 TP_printk("program=%u version=%u protocol=%d port=%u",
1376 __entry
->program
, __entry
->version
,
1377 __entry
->protocol
, __entry
->port
1381 TRACE_EVENT(rpcb_register
,
1389 TP_ARGS(program
, version
, addr
, netid
),
1392 __field(unsigned int, program
)
1393 __field(unsigned int, version
)
1394 __string(addr
, addr
)
1395 __string(netid
, netid
)
1399 __entry
->program
= program
;
1400 __entry
->version
= version
;
1401 __assign_str(addr
, addr
);
1402 __assign_str(netid
, netid
);
1405 TP_printk("program=%u version=%u addr=%s netid=%s",
1406 __entry
->program
, __entry
->version
,
1407 __get_str(addr
), __get_str(netid
)
1411 TRACE_EVENT(rpcb_unregister
,
1418 TP_ARGS(program
, version
, netid
),
1421 __field(unsigned int, program
)
1422 __field(unsigned int, version
)
1423 __string(netid
, netid
)
1427 __entry
->program
= program
;
1428 __entry
->version
= version
;
1429 __assign_str(netid
, netid
);
1432 TP_printk("program=%u version=%u netid=%s",
1433 __entry
->program
, __entry
->version
, __get_str(netid
)
1437 /* Record an xdr_buf containing a fully-formed RPC message */
1438 DECLARE_EVENT_CLASS(svc_xdr_msg_class
,
1440 const struct xdr_buf
*xdr
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
)
1456 __be32
*p
= (__be32
*)xdr
->head
[0].iov_base
;
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
;
1467 TP_printk("xid=0x%08x head=[%p,%zu] page=%u tail=[%p,%zu] len=%u",
1469 __entry
->head_base
, __entry
->head_len
, __entry
->page_len
,
1470 __entry
->tail_base
, __entry
->tail_len
, __entry
->msg_len
1474 #define DEFINE_SVCXDRMSG_EVENT(name) \
1475 DEFINE_EVENT(svc_xdr_msg_class, \
1478 const struct xdr_buf *xdr \
1482 DEFINE_SVCXDRMSG_EVENT(recvfrom
);
1484 /* Record an xdr_buf containing arbitrary data, tagged with an XID */
1485 DECLARE_EVENT_CLASS(svc_xdr_buf_class
,
1488 const struct xdr_buf
*xdr
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
)
1504 __entry
->xid
= be32_to_cpu(xid
);
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
;
1513 TP_printk("xid=0x%08x head=[%p,%zu] page=%u tail=[%p,%zu] len=%u",
1515 __entry
->head_base
, __entry
->head_len
, __entry
->page_len
,
1516 __entry
->tail_base
, __entry
->tail_len
, __entry
->msg_len
1520 #define DEFINE_SVCXDRBUF_EVENT(name) \
1521 DEFINE_EVENT(svc_xdr_buf_class, \
1525 const struct xdr_buf *xdr \
1529 DEFINE_SVCXDRBUF_EVENT(sendto
);
1532 * from include/linux/sunrpc/svc.h
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) \
1542 svc_rqst_flag_end(DATA)
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);
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 }
1556 #define show_rqstp_flags(flags) \
1557 __print_flags(flags, "|", SVC_RQST_FLAG_LIST)
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
);
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" })
1583 TRACE_EVENT(svc_authenticate
,
1584 TP_PROTO(const struct svc_rqst
*rqst
, int auth_res
),
1586 TP_ARGS(rqst
, auth_res
),
1590 __field(unsigned long, svc_status
)
1591 __field(unsigned long, auth_stat
)
1595 __entry
->xid
= be32_to_cpu(rqst
->rq_xid
);
1596 __entry
->svc_status
= auth_res
;
1597 __entry
->auth_stat
= be32_to_cpu(rqst
->rq_auth_stat
);
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
))
1605 TRACE_EVENT(svc_process
,
1606 TP_PROTO(const struct svc_rqst
*rqst
, const char *name
),
1608 TP_ARGS(rqst
, name
),
1614 __string(service
, name
)
1615 __string(procedure
, svc_proc_name(rqst
))
1616 __string(addr
, rqst
->rq_xprt
?
1617 rqst
->rq_xprt
->xpt_remotebuf
: "(null)")
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
);
1625 __assign_str(procedure
, svc_proc_name(rqst
));
1626 __assign_str(addr
, rqst
->rq_xprt
?
1627 rqst
->rq_xprt
->xpt_remotebuf
: "(null)");
1630 TP_printk("addr=%s xid=0x%08x service=%s vers=%u proc=%s",
1631 __get_str(addr
), __entry
->xid
,
1632 __get_str(service
), __entry
->vers
,
1633 __get_str(procedure
)
1637 DECLARE_EVENT_CLASS(svc_rqst_event
,
1640 const struct svc_rqst
*rqst
1647 __field(unsigned long, flags
)
1648 __string(addr
, rqst
->rq_xprt
->xpt_remotebuf
)
1652 __entry
->xid
= be32_to_cpu(rqst
->rq_xid
);
1653 __entry
->flags
= rqst
->rq_flags
;
1654 __assign_str(addr
, rqst
->rq_xprt
->xpt_remotebuf
);
1657 TP_printk("addr=%s xid=0x%08x flags=%s",
1658 __get_str(addr
), __entry
->xid
,
1659 show_rqstp_flags(__entry
->flags
))
1661 #define DEFINE_SVC_RQST_EVENT(name) \
1662 DEFINE_EVENT(svc_rqst_event, svc_##name, \
1664 const struct svc_rqst *rqst \
1668 DEFINE_SVC_RQST_EVENT(defer
);
1669 DEFINE_SVC_RQST_EVENT(drop
);
1671 DECLARE_EVENT_CLASS(svc_rqst_status
,
1673 TP_PROTO(struct svc_rqst
*rqst
, int status
),
1675 TP_ARGS(rqst
, status
),
1679 __field(int, status
)
1680 __field(unsigned long, flags
)
1681 __string(addr
, rqst
->rq_xprt
->xpt_remotebuf
)
1685 __entry
->xid
= be32_to_cpu(rqst
->rq_xid
);
1686 __entry
->status
= status
;
1687 __entry
->flags
= rqst
->rq_flags
;
1688 __assign_str(addr
, rqst
->rq_xprt
->xpt_remotebuf
);
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
))
1696 DEFINE_EVENT(svc_rqst_status
, svc_send
,
1697 TP_PROTO(struct svc_rqst
*rqst
, int status
),
1698 TP_ARGS(rqst
, status
));
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"}, \
1713 { (1UL << XPT_LOCAL), "XPT_LOCAL"}, \
1714 { (1UL << XPT_KILL_TEMP), "XPT_KILL_TEMP"}, \
1715 { (1UL << XPT_CONG_CTRL), "XPT_CONG_CTRL"})
1717 TRACE_EVENT(svc_xprt_create_err
,
1719 const char *program
,
1720 const char *protocol
,
1721 struct sockaddr
*sap
,
1722 const struct svc_xprt
*xprt
1725 TP_ARGS(program
, protocol
, sap
, xprt
),
1728 __field(long, error
)
1729 __string(program
, program
)
1730 __string(protocol
, protocol
)
1731 __array(unsigned char, addr
, sizeof(struct sockaddr_in6
))
1735 __entry
->error
= PTR_ERR(xprt
);
1736 __assign_str(program
, program
);
1737 __assign_str(protocol
, protocol
);
1738 memcpy(__entry
->addr
, sap
, sizeof(__entry
->addr
));
1741 TP_printk("addr=%pISpc program=%s protocol=%s error=%ld",
1742 __entry
->addr
, __get_str(program
), __get_str(protocol
),
1746 TRACE_EVENT(svc_xprt_do_enqueue
,
1747 TP_PROTO(struct svc_xprt
*xprt
, struct svc_rqst
*rqst
),
1749 TP_ARGS(xprt
, rqst
),
1753 __field(unsigned long, flags
)
1754 __string(addr
, xprt
->xpt_remotebuf
)
1758 __entry
->pid
= rqst
? rqst
->rq_task
->pid
: 0;
1759 __entry
->flags
= xprt
->xpt_flags
;
1760 __assign_str(addr
, xprt
->xpt_remotebuf
);
1763 TP_printk("addr=%s pid=%d flags=%s", __get_str(addr
),
1764 __entry
->pid
, show_svc_xprt_flags(__entry
->flags
))
1767 DECLARE_EVENT_CLASS(svc_xprt_event
,
1768 TP_PROTO(struct svc_xprt
*xprt
),
1773 __field(unsigned long, flags
)
1774 __string(addr
, xprt
->xpt_remotebuf
)
1778 __entry
->flags
= xprt
->xpt_flags
;
1779 __assign_str(addr
, xprt
->xpt_remotebuf
);
1782 TP_printk("addr=%s flags=%s", __get_str(addr
),
1783 show_svc_xprt_flags(__entry
->flags
))
1786 #define DEFINE_SVC_XPRT_EVENT(name) \
1787 DEFINE_EVENT(svc_xprt_event, svc_xprt_##name, \
1789 struct svc_xprt *xprt \
1793 DEFINE_SVC_XPRT_EVENT(received
);
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
);
1799 TRACE_EVENT(svc_xprt_accept
,
1801 const struct svc_xprt
*xprt
,
1805 TP_ARGS(xprt
, service
),
1808 __string(addr
, xprt
->xpt_remotebuf
)
1809 __string(protocol
, xprt
->xpt_class
->xcl_name
)
1810 __string(service
, service
)
1814 __assign_str(addr
, xprt
->xpt_remotebuf
);
1815 __assign_str(protocol
, xprt
->xpt_class
->xcl_name
);
1816 __assign_str(service
, service
);
1819 TP_printk("addr=%s protocol=%s service=%s",
1820 __get_str(addr
), __get_str(protocol
), __get_str(service
)
1824 TRACE_EVENT(svc_xprt_dequeue
,
1825 TP_PROTO(struct svc_rqst
*rqst
),
1830 __field(unsigned long, flags
)
1831 __field(unsigned long, wakeup
)
1832 __string(addr
, rqst
->rq_xprt
->xpt_remotebuf
)
1836 __entry
->flags
= rqst
->rq_xprt
->xpt_flags
;
1837 __entry
->wakeup
= ktime_to_us(ktime_sub(ktime_get(),
1839 __assign_str(addr
, rqst
->rq_xprt
->xpt_remotebuf
);
1842 TP_printk("addr=%s flags=%s wakeup-us=%lu", __get_str(addr
),
1843 show_svc_xprt_flags(__entry
->flags
), __entry
->wakeup
)
1846 TRACE_EVENT(svc_wake_up
,
1859 TP_printk("pid=%d", __entry
->pid
)
1862 TRACE_EVENT(svc_handle_xprt
,
1863 TP_PROTO(struct svc_xprt
*xprt
, int len
),
1869 __field(unsigned long, flags
)
1870 __string(addr
, xprt
->xpt_remotebuf
)
1875 __entry
->flags
= xprt
->xpt_flags
;
1876 __assign_str(addr
, xprt
->xpt_remotebuf
);
1879 TP_printk("addr=%s len=%d flags=%s", __get_str(addr
),
1880 __entry
->len
, show_svc_xprt_flags(__entry
->flags
))
1883 TRACE_EVENT(svc_stats_latency
,
1884 TP_PROTO(const struct svc_rqst
*rqst
),
1890 __field(unsigned long, execute
)
1891 __string(procedure
, svc_proc_name(rqst
))
1892 __string(addr
, rqst
->rq_xprt
->xpt_remotebuf
)
1896 __entry
->xid
= be32_to_cpu(rqst
->rq_xid
);
1897 __entry
->execute
= ktime_to_us(ktime_sub(ktime_get(),
1899 __assign_str(procedure
, svc_proc_name(rqst
));
1900 __assign_str(addr
, rqst
->rq_xprt
->xpt_remotebuf
);
1903 TP_printk("addr=%s xid=0x%08x proc=%s execute-us=%lu",
1904 __get_str(addr
), __entry
->xid
, __get_str(procedure
),
1908 DECLARE_EVENT_CLASS(svc_deferred_event
,
1910 const struct svc_deferred_req
*dr
1916 __field(const void *, dr
)
1918 __string(addr
, dr
->xprt
->xpt_remotebuf
)
1923 __entry
->xid
= be32_to_cpu(*(__be32
*)(dr
->args
+
1924 (dr
->xprt_hlen
>>2)));
1925 __assign_str(addr
, dr
->xprt
->xpt_remotebuf
);
1928 TP_printk("addr=%s dr=%p xid=0x%08x", __get_str(addr
), __entry
->dr
,
1932 #define DEFINE_SVC_DEFERRED_EVENT(name) \
1933 DEFINE_EVENT(svc_deferred_event, svc_defer_##name, \
1935 const struct svc_deferred_req *dr \
1939 DEFINE_SVC_DEFERRED_EVENT(drop
);
1940 DEFINE_SVC_DEFERRED_EVENT(queue
);
1941 DEFINE_SVC_DEFERRED_EVENT(recv
);
1943 TRACE_EVENT(svcsock_new_socket
,
1945 const struct socket
*socket
1951 __field(unsigned long, type
)
1952 __field(unsigned long, family
)
1953 __field(bool, listener
)
1957 __entry
->type
= socket
->type
;
1958 __entry
->family
= socket
->sk
->sk_family
;
1959 __entry
->listener
= (socket
->sk
->sk_state
== TCP_LISTEN
);
1962 TP_printk("type=%s family=%s%s",
1963 show_socket_type(__entry
->type
),
1964 rpc_show_address_family(__entry
->family
),
1965 __entry
->listener
? " (listener)" : ""
1969 TRACE_EVENT(svcsock_marker
,
1971 const struct svc_xprt
*xprt
,
1975 TP_ARGS(xprt
, marker
),
1978 __field(unsigned int, length
)
1980 __string(addr
, xprt
->xpt_remotebuf
)
1984 __entry
->length
= be32_to_cpu(marker
) & RPC_FRAGMENT_SIZE_MASK
;
1985 __entry
->last
= be32_to_cpu(marker
) & RPC_LAST_STREAM_FRAGMENT
;
1986 __assign_str(addr
, xprt
->xpt_remotebuf
);
1989 TP_printk("addr=%s length=%u%s", __get_str(addr
),
1990 __entry
->length
, __entry
->last
? " (last)" : "")
1993 DECLARE_EVENT_CLASS(svcsock_class
,
1995 const struct svc_xprt
*xprt
,
1999 TP_ARGS(xprt
, result
),
2002 __field(ssize_t
, result
)
2003 __field(unsigned long, flags
)
2004 __string(addr
, xprt
->xpt_remotebuf
)
2008 __entry
->result
= result
;
2009 __entry
->flags
= xprt
->xpt_flags
;
2010 __assign_str(addr
, xprt
->xpt_remotebuf
);
2013 TP_printk("addr=%s result=%zd flags=%s", __get_str(addr
),
2014 __entry
->result
, show_svc_xprt_flags(__entry
->flags
)
2018 #define DEFINE_SVCSOCK_EVENT(name) \
2019 DEFINE_EVENT(svcsock_class, svcsock_##name, \
2021 const struct svc_xprt *xprt, \
2024 TP_ARGS(xprt, result))
2026 DEFINE_SVCSOCK_EVENT(udp_send
);
2027 DEFINE_SVCSOCK_EVENT(udp_recv
);
2028 DEFINE_SVCSOCK_EVENT(udp_recv_err
);
2029 DEFINE_SVCSOCK_EVENT(tcp_send
);
2030 DEFINE_SVCSOCK_EVENT(tcp_recv
);
2031 DEFINE_SVCSOCK_EVENT(tcp_recv_eagain
);
2032 DEFINE_SVCSOCK_EVENT(tcp_recv_err
);
2033 DEFINE_SVCSOCK_EVENT(data_ready
);
2034 DEFINE_SVCSOCK_EVENT(write_space
);
2036 TRACE_EVENT(svcsock_tcp_recv_short
,
2038 const struct svc_xprt
*xprt
,
2043 TP_ARGS(xprt
, expected
, received
),
2046 __field(u32
, expected
)
2047 __field(u32
, received
)
2048 __field(unsigned long, flags
)
2049 __string(addr
, xprt
->xpt_remotebuf
)
2053 __entry
->expected
= expected
;
2054 __entry
->received
= received
;
2055 __entry
->flags
= xprt
->xpt_flags
;
2056 __assign_str(addr
, xprt
->xpt_remotebuf
);
2059 TP_printk("addr=%s flags=%s expected=%u received=%u",
2060 __get_str(addr
), show_svc_xprt_flags(__entry
->flags
),
2061 __entry
->expected
, __entry
->received
2065 TRACE_EVENT(svcsock_tcp_state
,
2067 const struct svc_xprt
*xprt
,
2068 const struct socket
*socket
2071 TP_ARGS(xprt
, socket
),
2074 __field(unsigned long, socket_state
)
2075 __field(unsigned long, sock_state
)
2076 __field(unsigned long, flags
)
2077 __string(addr
, xprt
->xpt_remotebuf
)
2081 __entry
->socket_state
= socket
->state
;
2082 __entry
->sock_state
= socket
->sk
->sk_state
;
2083 __entry
->flags
= xprt
->xpt_flags
;
2084 __assign_str(addr
, xprt
->xpt_remotebuf
);
2087 TP_printk("addr=%s state=%s sk_state=%s flags=%s", __get_str(addr
),
2088 rpc_show_socket_state(__entry
->socket_state
),
2089 rpc_show_sock_state(__entry
->sock_state
),
2090 show_svc_xprt_flags(__entry
->flags
)
2094 DECLARE_EVENT_CLASS(svcsock_accept_class
,
2096 const struct svc_xprt
*xprt
,
2097 const char *service
,
2101 TP_ARGS(xprt
, service
, status
),
2104 __field(long, status
)
2105 __string(service
, service
)
2106 __array(unsigned char, addr
, sizeof(struct sockaddr_in6
))
2110 __entry
->status
= status
;
2111 __assign_str(service
, service
);
2112 memcpy(__entry
->addr
, &xprt
->xpt_local
, sizeof(__entry
->addr
));
2115 TP_printk("listener=%pISpc service=%s status=%ld",
2116 __entry
->addr
, __get_str(service
), __entry
->status
2120 #define DEFINE_ACCEPT_EVENT(name) \
2121 DEFINE_EVENT(svcsock_accept_class, svcsock_##name##_err, \
2123 const struct svc_xprt *xprt, \
2124 const char *service, \
2127 TP_ARGS(xprt, service, status))
2129 DEFINE_ACCEPT_EVENT(accept
);
2130 DEFINE_ACCEPT_EVENT(getpeername
);
2132 DECLARE_EVENT_CLASS(cache_event
,
2134 const struct cache_detail
*cd
,
2135 const struct cache_head
*h
2141 __field(const struct cache_head
*, h
)
2142 __string(name
, cd
->name
)
2147 __assign_str(name
, cd
->name
);
2150 TP_printk("cache=%s entry=%p", __get_str(name
), __entry
->h
)
2152 #define DEFINE_CACHE_EVENT(name) \
2153 DEFINE_EVENT(cache_event, name, \
2155 const struct cache_detail *cd, \
2156 const struct cache_head *h \
2159 DEFINE_CACHE_EVENT(cache_entry_expired
);
2160 DEFINE_CACHE_EVENT(cache_entry_upcall
);
2161 DEFINE_CACHE_EVENT(cache_entry_update
);
2162 DEFINE_CACHE_EVENT(cache_entry_make_negative
);
2163 DEFINE_CACHE_EVENT(cache_entry_no_listener
);
2165 DECLARE_EVENT_CLASS(register_class
,
2167 const char *program
,
2170 const unsigned short protocol
,
2171 const unsigned short port
,
2175 TP_ARGS(program
, version
, family
, protocol
, port
, error
),
2178 __field(u32
, version
)
2179 __field(unsigned long, family
)
2180 __field(unsigned short, protocol
)
2181 __field(unsigned short, port
)
2183 __string(program
, program
)
2187 __entry
->version
= version
;
2188 __entry
->family
= family
;
2189 __entry
->protocol
= protocol
;
2190 __entry
->port
= port
;
2191 __entry
->error
= error
;
2192 __assign_str(program
, program
);
2195 TP_printk("program=%sv%u proto=%s port=%u family=%s error=%d",
2196 __get_str(program
), __entry
->version
,
2197 __entry
->protocol
== IPPROTO_UDP
? "udp" : "tcp",
2198 __entry
->port
, rpc_show_address_family(__entry
->family
),
2203 #define DEFINE_REGISTER_EVENT(name) \
2204 DEFINE_EVENT(register_class, svc_##name, \
2206 const char *program, \
2207 const u32 version, \
2209 const unsigned short protocol, \
2210 const unsigned short port, \
2213 TP_ARGS(program, version, family, protocol, \
2216 DEFINE_REGISTER_EVENT(register);
2217 DEFINE_REGISTER_EVENT(noregister
);
2219 TRACE_EVENT(svc_unregister
,
2221 const char *program
,
2226 TP_ARGS(program
, version
, error
),
2229 __field(u32
, version
)
2231 __string(program
, program
)
2235 __entry
->version
= version
;
2236 __entry
->error
= error
;
2237 __assign_str(program
, program
);
2240 TP_printk("program=%sv%u error=%d",
2241 __get_str(program
), __entry
->version
, __entry
->error
2245 #endif /* _TRACE_SUNRPC_H */
2247 #include <trace/define_trace.h>