diff mbox series

[1/1] SUNRPC: add xrpt id to rpc_stats_latency tracepoint

Message ID 20240117195912.19099-1-olga.kornievskaia@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/1] SUNRPC: add xrpt id to rpc_stats_latency tracepoint | expand

Commit Message

Olga Kornievskaia Jan. 17, 2024, 7:59 p.m. UTC
From: Olga Kornievskaia <kolga@netapp.com>

In order to get the latency per xprt under the same clientid this patch
adds xprt_id to the tracepoint output.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 include/trace/events/sunrpc.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Chen Hanxiao Jan. 18, 2024, 4:05 a.m. UTC | #1
> -----邮件原件-----
> 发件人: Olga Kornievskaia <olga.kornievskaia@gmail.com>
> 发送时间: 2024年1月18日 3:59
> 收件人: trond.myklebust@hammerspace.com; anna.schumaker@netapp.com
> 抄送: linux-nfs@vger.kernel.org
> 主题: [PATCH 1/1] SUNRPC: add xrpt id to rpc_stats_latency tracepoint
> 
> From: Olga Kornievskaia <kolga@netapp.com>
> 
> In order to get the latency per xprt under the same clientid this patch adds
> xprt_id to the tracepoint output.
> 
> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
> ---
>  include/trace/events/sunrpc.h | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h index
> 337c90787fb1..c1d500c3e031 100644
> --- a/include/trace/events/sunrpc.h
> +++ b/include/trace/events/sunrpc.h
> @@ -639,6 +639,7 @@ TRACE_EVENT(rpc_stats_latency,
>  		__field(unsigned long, backlog)
>  		__field(unsigned long, rtt)
>  		__field(unsigned long, execute)
> +		__field(u32, xprt_id)
>  	),
> 
>  	TP_fast_assign(
> @@ -651,13 +652,16 @@ TRACE_EVENT(rpc_stats_latency,
>  		__entry->backlog = ktime_to_us(backlog);
>  		__entry->rtt = ktime_to_us(rtt);
>  		__entry->execute = ktime_to_us(execute);
> +		__entry->xprt_id = task->tk_xprt->id;
>  	),
> 
>  	TP_printk(SUNRPC_TRACE_TASK_SPECIFIER
> -		  " xid=0x%08x %sv%d %s backlog=%lu rtt=%lu execute=%lu",
> +		  " xid=0x%08x %sv%d %s backlog=%lu rtt=%lu execute=%lu"
> +		  " xprt_id=%d",
>  		__entry->task_id, __entry->client_id, __entry->xid,
>  		__get_str(progname), __entry->version, __get_str(procname),
> -		__entry->backlog, __entry->rtt, __entry->execute)
> +		__entry->backlog, __entry->rtt, __entry->execute,
> +		__entry->xprt_id)
>  );
> 
>  TRACE_EVENT(rpc_xdr_overflow,
> --
> 2.39.1
> 

Tested-by: Chen Hanxiao <chenhx.fnst@fujitsu.com>

Regards,
- Chen
diff mbox series

Patch

diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
index 337c90787fb1..c1d500c3e031 100644
--- a/include/trace/events/sunrpc.h
+++ b/include/trace/events/sunrpc.h
@@ -639,6 +639,7 @@  TRACE_EVENT(rpc_stats_latency,
 		__field(unsigned long, backlog)
 		__field(unsigned long, rtt)
 		__field(unsigned long, execute)
+		__field(u32, xprt_id)
 	),
 
 	TP_fast_assign(
@@ -651,13 +652,16 @@  TRACE_EVENT(rpc_stats_latency,
 		__entry->backlog = ktime_to_us(backlog);
 		__entry->rtt = ktime_to_us(rtt);
 		__entry->execute = ktime_to_us(execute);
+		__entry->xprt_id = task->tk_xprt->id;
 	),
 
 	TP_printk(SUNRPC_TRACE_TASK_SPECIFIER
-		  " xid=0x%08x %sv%d %s backlog=%lu rtt=%lu execute=%lu",
+		  " xid=0x%08x %sv%d %s backlog=%lu rtt=%lu execute=%lu"
+		  " xprt_id=%d",
 		__entry->task_id, __entry->client_id, __entry->xid,
 		__get_str(progname), __entry->version, __get_str(procname),
-		__entry->backlog, __entry->rtt, __entry->execute)
+		__entry->backlog, __entry->rtt, __entry->execute,
+		__entry->xprt_id)
 );
 
 TRACE_EVENT(rpc_xdr_overflow,