Skip to content

Commit

Permalink
Re-using already calculated delta_us in tcpconnlat
Browse files Browse the repository at this point in the history
  • Loading branch information
dpayne committed Jan 17, 2018
1 parent 3aed4fb commit ce0cf92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/tcpconnlat.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
data4.saddr = skp->__sk_common.skc_rcv_saddr;
data4.daddr = skp->__sk_common.skc_daddr;
data4.dport = ntohs(dport);
data4.delta_us = (now - ts) / 1000;
data4.delta_us = delta_us;
__builtin_memcpy(&data4.task, infop->task, sizeof(data4.task));
ipv4_events.perf_submit(ctx, &data4, sizeof(data4));
Expand All @@ -156,7 +156,7 @@
bpf_probe_read(&data6.daddr, sizeof(data6.daddr),
skp->__sk_common.skc_v6_daddr.in6_u.u6_addr32);
data6.dport = ntohs(dport);
data6.delta_us = (now - ts) / 1000;
data6.delta_us = delta_us;
__builtin_memcpy(&data6.task, infop->task, sizeof(data6.task));
ipv6_events.perf_submit(ctx, &data6, sizeof(data6));
}
Expand Down

0 comments on commit ce0cf92

Please sign in to comment.