[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171020212046.577888-6-songliubraving@fb.com>
Date: Fri, 20 Oct 2017 14:20:45 -0700
From: Song Liu <songliubraving@...com>
To: <netdev@...r.kernel.org>, <davem@...emloft.net>
CC: <alexei.starovoitov@...il.com>, <liu.song.a23@...il.com>,
Song Liu <songliubraving@...com>
Subject: [PATCH net-next 5/6] tcp: add tracepoint trace_tcp_destroy_sock
This patch adds trace event trace_tcp_destroy_sock.
Signed-off-by: Song Liu <songliubraving@...com>
---
include/trace/events/tcp.h | 7 +++++++
net/ipv4/tcp_ipv4.c | 2 ++
2 files changed, 9 insertions(+)
diff --git a/include/trace/events/tcp.h b/include/trace/events/tcp.h
index c83c711..1724c12 100644
--- a/include/trace/events/tcp.h
+++ b/include/trace/events/tcp.h
@@ -154,6 +154,13 @@ DEFINE_EVENT(tcp_event_sk, tcp_receive_reset,
TP_ARGS(sk)
);
+DEFINE_EVENT(tcp_event_sk, tcp_destroy_sock,
+
+ TP_PROTO(const struct sock *sk),
+
+ TP_ARGS(sk)
+);
+
#endif /* _TRACE_TCP_H */
/* This part must be outside protection */
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index aa99d9d..736753a 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1865,6 +1865,8 @@ void tcp_v4_destroy_sock(struct sock *sk)
{
struct tcp_sock *tp = tcp_sk(sk);
+ trace_tcp_destroy_sock(sk);
+
tcp_clear_xmit_timers(sk);
tcp_cleanup_congestion_control(sk);
--
2.9.5
Powered by blists - more mailing lists