diff options
author | Song Liu <songliubraving@fb.com> | 2017-10-23 12:20:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-23 20:21:25 -0400 |
commit | f6e37b25413cf636369668652e9752ee77c7d9f7 (patch) | |
tree | 646f1226c2f354452897f431f93173a92e963b0a | |
parent | bded4422f79a26587e015824a1a22811a8e3b749 (diff) |
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: Song Liu <songliubraving@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/trace/events/tcp.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/trace/events/tcp.h b/include/trace/events/tcp.h index c3220d914475..14b0a7083f1d 100644 --- a/include/trace/events/tcp.h +++ b/include/trace/events/tcp.h | |||
@@ -9,7 +9,13 @@ | |||
9 | #include <linux/tracepoint.h> | 9 | #include <linux/tracepoint.h> |
10 | #include <net/ipv6.h> | 10 | #include <net/ipv6.h> |
11 | 11 | ||
12 | TRACE_EVENT(tcp_retransmit_skb, | 12 | /* |
13 | * tcp event with arguments sk and skb | ||
14 | * | ||
15 | * Note: this class requires a valid sk pointer; while skb pointer could | ||
16 | * be NULL. | ||
17 | */ | ||
18 | DECLARE_EVENT_CLASS(tcp_event_sk_skb, | ||
13 | 19 | ||
14 | TP_PROTO(struct sock *sk, struct sk_buff *skb), | 20 | TP_PROTO(struct sock *sk, struct sk_buff *skb), |
15 | 21 | ||
@@ -64,6 +70,13 @@ TRACE_EVENT(tcp_retransmit_skb, | |||
64 | __entry->saddr_v6, __entry->daddr_v6) | 70 | __entry->saddr_v6, __entry->daddr_v6) |
65 | ); | 71 | ); |
66 | 72 | ||
73 | DEFINE_EVENT(tcp_event_sk_skb, tcp_retransmit_skb, | ||
74 | |||
75 | TP_PROTO(struct sock *sk, struct sk_buff *skb), | ||
76 | |||
77 | TP_ARGS(sk, skb) | ||
78 | ); | ||
79 | |||
67 | #endif /* _TRACE_TCP_H */ | 80 | #endif /* _TRACE_TCP_H */ |
68 | 81 | ||
69 | /* This part must be outside protection */ | 82 | /* This part must be outside protection */ |