Last active
January 22, 2021 18:46
-
-
Save rsevilla87/379d2f27e542d111ff293e1170c7d74d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bpftrace | |
BEGIN | |
{ | |
printf("Tracing masked_flow_lookup... Hit Ctrl-C to end\n"); | |
} | |
kprobe:masked_flow_lookup{ | |
@start[tid] = nsecs; | |
@count++ | |
} | |
kretprobe:masked_flow_lookup /@start[tid]/{ | |
$latency = nsecs - @start[tid]; | |
delete(@start[tid]); | |
@lat = lhist($latency, 0, 2000, 100); | |
} | |
END | |
{ | |
printf("\nTotal masked_flow_lookup calls: %d", @count); | |
clear(@start); | |
clear(@count); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment