Re: [PATCH] net/tcp: introduce TRACE_EVENT for TCP/IPv4 state transition

2017-11-09 Thread Steven Rostedt
On Thu, 9 Nov 2017 23:40:13 + Song Liu wrote: > > tcp_set_state uses __print_symbolic to show state in text format. I found > > trace-cmd cannot parse that part: > > > > [011] 147338.660560: tcp_set_state:sport=16262 dport=48346 \ > >saddr=127.0.0.6 daddr=127.0.0.6 saddrv6=2401:d

Re: [PATCH] net/tcp: introduce TRACE_EVENT for TCP/IPv4 state transition

2017-11-09 Thread Song Liu
> On Nov 9, 2017, at 10:34 AM, Song Liu wrote: > >> >> On Nov 9, 2017, at 10:18 AM, Steven Rostedt wrote: >> >> On Thu, 9 Nov 2017 15:43:29 +0900 >> Alexei Starovoitov wrote: >> +TRACE_EVENT(tcp_set_state, + TP_PROTO(struct sock *sk, int oldstate, int newstate), + TP_ARGS(s

Re: [PATCH] net/tcp: introduce TRACE_EVENT for TCP/IPv4 state transition

2017-11-09 Thread Song Liu
> On Nov 9, 2017, at 10:18 AM, Steven Rostedt wrote: > > On Thu, 9 Nov 2017 15:43:29 +0900 > Alexei Starovoitov wrote: > >>> +TRACE_EVENT(tcp_set_state, >>> + TP_PROTO(struct sock *sk, int oldstate, int newstate), >>> + TP_ARGS(sk, oldstate, newstate), >>> + >>> + TP_STRUCT__entry( >>> +

Re: [PATCH] net/tcp: introduce TRACE_EVENT for TCP/IPv4 state transition

2017-11-09 Thread Steven Rostedt
On Thu, 9 Nov 2017 15:43:29 +0900 Alexei Starovoitov wrote: > > +TRACE_EVENT(tcp_set_state, > > + TP_PROTO(struct sock *sk, int oldstate, int newstate), > > + TP_ARGS(sk, oldstate, newstate), > > + > > + TP_STRUCT__entry( > > + __field(__be32, dst) > > + __field(__be32,

Re: [PATCH] net/tcp: introduce TRACE_EVENT for TCP/IPv4 state transition

2017-11-08 Thread Yafang Shao
2017-11-09 14:43 GMT+08:00 Alexei Starovoitov : > On Thu, Nov 09, 2017 at 02:01:38PM +0800, Yafang Shao wrote: >> With this newly introduced TRACE_EVENT, it will be very easy to minotor >> TCP/IPv4 state transition. >> >> A new TRACE_SYSTEM named tcp is added, in which we can trace other TCP >> eve

Re: [PATCH] net/tcp: introduce TRACE_EVENT for TCP/IPv4 state transition

2017-11-08 Thread Alexei Starovoitov
On Thu, Nov 09, 2017 at 02:01:38PM +0800, Yafang Shao wrote: > With this newly introduced TRACE_EVENT, it will be very easy to minotor > TCP/IPv4 state transition. > > A new TRACE_SYSTEM named tcp is added, in which we can trace other TCP > event as well. > > Two helpers are added, > static inlin

[PATCH] net/tcp: introduce TRACE_EVENT for TCP/IPv4 state transition

2017-11-08 Thread Yafang Shao
With this newly introduced TRACE_EVENT, it will be very easy to minotor TCP/IPv4 state transition. A new TRACE_SYSTEM named tcp is added, in which we can trace other TCP event as well. Two helpers are added, static inline void __tcp_set_state(struct sock *sk, int state) static inline void __sk_st