Commit f6e37b25 authored by Song Liu's avatar Song Liu Committed by David S. Miller

tcp: add trace event class tcp_event_sk_skb

Introduce event class tcp_event_sk_skb for tcp tracepoints that
have arguments sk and skb.

Existing tracepoint trace_tcp_retransmit_skb() falls into this class.
This patch rewrites the definition of trace_tcp_retransmit_skb() with
tcp_event_sk_skb.
Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bded4422
...@@ -9,7 +9,13 @@ ...@@ -9,7 +9,13 @@
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#include <net/ipv6.h> #include <net/ipv6.h>
TRACE_EVENT(tcp_retransmit_skb, /*
* tcp event with arguments sk and skb
*
* Note: this class requires a valid sk pointer; while skb pointer could
* be NULL.
*/
DECLARE_EVENT_CLASS(tcp_event_sk_skb,
TP_PROTO(struct sock *sk, struct sk_buff *skb), TP_PROTO(struct sock *sk, struct sk_buff *skb),
...@@ -64,6 +70,13 @@ TRACE_EVENT(tcp_retransmit_skb, ...@@ -64,6 +70,13 @@ TRACE_EVENT(tcp_retransmit_skb,
__entry->saddr_v6, __entry->daddr_v6) __entry->saddr_v6, __entry->daddr_v6)
); );
DEFINE_EVENT(tcp_event_sk_skb, tcp_retransmit_skb,
TP_PROTO(struct sock *sk, struct sk_buff *skb),
TP_ARGS(sk, skb)
);
#endif /* _TRACE_TCP_H */ #endif /* _TRACE_TCP_H */
/* This part must be outside protection */ /* This part must be outside protection */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment