> -----邮件原件----- > 发件人: Olga Kornievskaia <olga.kornievskaia@xxxxxxxxx> > 发送时间: 2024年1月18日 3:59 > 收件人: trond.myklebust@xxxxxxxxxxxxxxx; anna.schumaker@xxxxxxxxxx > 抄送: linux-nfs@xxxxxxxxxxxxxxx > 主题: [PATCH 1/1] SUNRPC: add xrpt id to rpc_stats_latency tracepoint > > From: Olga Kornievskaia <kolga@xxxxxxxxxx> > > 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@xxxxxxxxxx> > --- > 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@xxxxxxxxxxx> Regards, - Chen