Messages in this thread | | | From | 运辉崔 <> | Date | Tue, 10 Jan 2023 16:58:36 +0800 | Subject | Re: [External] Re: [PATCH v4] sock: add tracepoint for send recv length |
| |
On Mon, Jan 9, 2023 at 11:39 PM Steven Rostedt <rostedt@goodmis.org> wrote:
> > But looking at this tracepoint again, I see a issue that can help with the > dereferencing. > > Why is family and protocol passed in? > > + trace_sock_send_length(sock->sk, sock->sk->sk_family, > + sock->sk->sk_protocol, ret, 0); > > > Where the TP_fast_assign() is: > > + TP_fast_assign( > + __entry->sk = sk; > + __entry->family = sk->sk_family; > + __entry->protocol = sk->sk_protocol; > + __entry->length = ret > 0 ? ret : 0; > + __entry->error = ret < 0 ? ret : 0; > + __entry->flags = flags; > + ), > > The family and protocol is taken from the sk, and not the parameters. I bet > dropping those would help. > > -- Steve >
Many thanks to Eric and Steven for your discussions and suggestions, I will update on v5.
Thanks, Yunhui
| |