Skip to content

Commit e1a4aa5

Browse files
liu-song-6davem330
authored andcommitted
tcp: add tracepoint trace_tcp_destroy_sock
This patch adds trace event trace_tcp_destroy_sock. Signed-off-by: Song Liu <songliubraving@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 5941521 commit e1a4aa5

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

include/trace/events/tcp.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,13 @@ DEFINE_EVENT(tcp_event_sk, tcp_receive_reset,
154154
TP_ARGS(sk)
155155
);
156156

157+
DEFINE_EVENT(tcp_event_sk, tcp_destroy_sock,
158+
159+
TP_PROTO(const struct sock *sk),
160+
161+
TP_ARGS(sk)
162+
);
163+
157164
#endif /* _TRACE_TCP_H */
158165

159166
/* This part must be outside protection */

net/ipv4/tcp_ipv4.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,6 +1869,8 @@ void tcp_v4_destroy_sock(struct sock *sk)
18691869
{
18701870
struct tcp_sock *tp = tcp_sk(sk);
18711871

1872+
trace_tcp_destroy_sock(sk);
1873+
18721874
tcp_clear_xmit_timers(sk);
18731875

18741876
tcp_cleanup_congestion_control(sk);

0 commit comments

Comments
 (0)