]> git.baikalelectronics.ru Git - kernel.git/commitdiff
SUNRPC: Remove low signal-to-noise tracepoints
authorChuck Lever <chuck.lever@oracle.com>
Tue, 19 Oct 2021 19:17:21 +0000 (15:17 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 13 Dec 2021 18:43:00 +0000 (13:43 -0500)
I'm about to add more information to the server-side SUNRPC
tracepoints, so I'm going to offset the increased trace log
consumption by getting rid of some tracepoints that fire frequently
but don't offer much value.

trace_svc_xprt_received() was useful for debugging, perhaps, but
is not generally informative.

trace_svc_handle_xprt() reports largely the same information as
trace_svc_xdr_recvfrom().

As a clean-up, rename trace_svc_xprt_do_enqueue() to match
svc_xprt_dequeue().

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
include/trace/events/sunrpc.h
net/sunrpc/svc_xprt.c

index 3a99358c262b4cd2d895e13cd4fc8bb1a2665272..684cc0e322fa36da599cf8f75c41a26323d07aad 100644 (file)
@@ -1768,7 +1768,7 @@ TRACE_EVENT(svc_xprt_create_err,
                __entry->error)
 );
 
-TRACE_EVENT(svc_xprt_do_enqueue,
+TRACE_EVENT(svc_xprt_enqueue,
        TP_PROTO(struct svc_xprt *xprt, struct svc_rqst *rqst),
 
        TP_ARGS(xprt, rqst),
@@ -1815,7 +1815,6 @@ DECLARE_EVENT_CLASS(svc_xprt_event,
                        ), \
                        TP_ARGS(xprt))
 
-DEFINE_SVC_XPRT_EVENT(received);
 DEFINE_SVC_XPRT_EVENT(no_write_space);
 DEFINE_SVC_XPRT_EVENT(close);
 DEFINE_SVC_XPRT_EVENT(detach);
@@ -1902,27 +1901,6 @@ TRACE_EVENT(svc_alloc_arg_err,
        TP_printk("pages=%u", __entry->pages)
 );
 
-TRACE_EVENT(svc_handle_xprt,
-       TP_PROTO(struct svc_xprt *xprt, int len),
-
-       TP_ARGS(xprt, len),
-
-       TP_STRUCT__entry(
-               __field(int, len)
-               __field(unsigned long, flags)
-               __string(addr, xprt->xpt_remotebuf)
-       ),
-
-       TP_fast_assign(
-               __entry->len = len;
-               __entry->flags = xprt->xpt_flags;
-               __assign_str(addr, xprt->xpt_remotebuf);
-       ),
-
-       TP_printk("addr=%s len=%d flags=%s", __get_str(addr),
-               __entry->len, show_svc_xprt_flags(__entry->flags))
-);
-
 TRACE_EVENT(svc_stats_latency,
        TP_PROTO(const struct svc_rqst *rqst),
 
index 1e99ba1b9d723d007ec3a00044b5ff922b7d8e56..b1744432489e33579198bc1fe48d9f19c40bc4e6 100644 (file)
@@ -264,8 +264,6 @@ void svc_xprt_received(struct svc_xprt *xprt)
                return;
        }
 
-       trace_svc_xprt_received(xprt);
-
        /* As soon as we clear busy, the xprt could be closed and
         * 'put', so we need a reference to call svc_enqueue_xprt with:
         */
@@ -466,7 +464,7 @@ void svc_xprt_do_enqueue(struct svc_xprt *xprt)
 out_unlock:
        rcu_read_unlock();
        put_cpu();
-       trace_svc_xprt_do_enqueue(xprt, rqstp);
+       trace_svc_xprt_enqueue(xprt, rqstp);
 }
 EXPORT_SYMBOL_GPL(svc_xprt_do_enqueue);
 
@@ -842,8 +840,8 @@ static int svc_handle_xprt(struct svc_rqst *rqstp, struct svc_xprt *xprt)
                atomic_add(rqstp->rq_reserved, &xprt->xpt_reserved);
        } else
                svc_xprt_received(xprt);
+
 out:
-       trace_svc_handle_xprt(xprt, len);
        return len;
 }