Skip to content

Commit

Permalink
drop unused pid, and improve code-path check
Browse files Browse the repository at this point in the history
  • Loading branch information
brendangregg committed Feb 20, 2016
1 parent 2482c1c commit 4db6d44
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/tcpconnlat.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@
// This should all be switched to static tracepoints when available.
int trace_tcp_rcv_state_process(struct pt_regs *ctx, struct sock *sk)
{
u32 pid = bpf_get_current_pid_tgid();
// will be in TCP_SYN_SENT for handshake
if (sk->__sk_common.skc_state != TCP_SYN_SENT)
return 0;
// check start and calculate delta
struct info_t *infop = start.lookup(&sk);
Expand Down

0 comments on commit 4db6d44

Please sign in to comment.