]> Git Repo - linux.git/commitdiff
SUNRPC: Move the svc_xdr_recvfrom() tracepoint
authorChuck Lever <[email protected]>
Fri, 24 Jul 2020 18:39:00 +0000 (14:39 -0400)
committerChuck Lever <[email protected]>
Mon, 30 Nov 2020 18:00:24 +0000 (13:00 -0500)
Commit c509f15a5801 ("SUNRPC: Split the xdr_buf event class") added
display of the rqst's XID to the svc_xdr_buf_class. However, when
the recvfrom tracepoint fires, rq_xid has yet to be filled in with
the current XID. So it ends up recording the previous XID that was
handled by that svc_rqst.

Signed-off-by: Chuck Lever <[email protected]>
include/trace/events/sunrpc.h
net/sunrpc/svc_xprt.c

index 2a03263b5f9d4f0825c68eeabbcbef034920b416..58994e01302216d9b935f6ac3a3bb4e7fb794077 100644 (file)
@@ -1500,30 +1500,6 @@ SVC_RQST_FLAG_LIST
 #define show_rqstp_flags(flags)                                                \
                __print_flags(flags, "|", SVC_RQST_FLAG_LIST)
 
-TRACE_EVENT(svc_recv,
-       TP_PROTO(struct svc_rqst *rqst, int len),
-
-       TP_ARGS(rqst, len),
-
-       TP_STRUCT__entry(
-               __field(u32, xid)
-               __field(int, len)
-               __field(unsigned long, flags)
-               __string(addr, rqst->rq_xprt->xpt_remotebuf)
-       ),
-
-       TP_fast_assign(
-               __entry->xid = be32_to_cpu(rqst->rq_xid);
-               __entry->len = len;
-               __entry->flags = rqst->rq_flags;
-               __assign_str(addr, rqst->rq_xprt->xpt_remotebuf);
-       ),
-
-       TP_printk("addr=%s xid=0x%08x len=%d flags=%s",
-                       __get_str(addr), __entry->xid, __entry->len,
-                       show_rqstp_flags(__entry->flags))
-);
-
 TRACE_DEFINE_ENUM(SVC_GARBAGE);
 TRACE_DEFINE_ENUM(SVC_SYSERR);
 TRACE_DEFINE_ENUM(SVC_VALID);
index 43cf8dbde898b262773286019216ce18bc5f4c91..5fb9164aa69059f77158a9f6ec796381474641ae 100644 (file)
@@ -813,8 +813,6 @@ static int svc_handle_xprt(struct svc_rqst *rqstp, struct svc_xprt *xprt)
                        len = svc_deferred_recv(rqstp);
                else
                        len = xprt->xpt_ops->xpo_recvfrom(rqstp);
-               if (len > 0)
-                       trace_svc_xdr_recvfrom(rqstp, &rqstp->rq_arg);
                rqstp->rq_stime = ktime_get();
                rqstp->rq_reserved = serv->sv_max_mesg;
                atomic_add(rqstp->rq_reserved, &xprt->xpt_reserved);
@@ -868,7 +866,7 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
 
        if (serv->sv_stats)
                serv->sv_stats->netcnt++;
-       trace_svc_recv(rqstp, len);
+       trace_svc_xdr_recvfrom(rqstp, &rqstp->rq_arg);
        return len;
 out_release:
        rqstp->rq_res.len = 0;
This page took 0.062358 seconds and 4 git commands to generate.