Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libbpf-tools: use fentry in funclatency
For tracing kernel functions, funclatency will attempt to use fentry and fallback to kprobes if that fails. I left the option to force the use of kprobes if you'd like. Under load, fentry is more efficient: With kprobes: cpu:/tmp/b# ./funclatency -u -k bpf_spin_lock Tracing bpf_spin_lock. Hit Ctrl-C to exit ^C usec : count distribution 0 -> 1 : 565159 |****************************************| 2 -> 3 : 216204 |*************** | 4 -> 7 : 306316 |********************* | 8 -> 15 : 416990 |***************************** | 16 -> 31 : 415110 |***************************** | 32 -> 63 : 170298 |************ | 64 -> 127 : 29726 |** | 128 -> 255 : 427962 |****************************** | 256 -> 511 : 233207 |**************** | 512 -> 1023 : 453 | | 1024 -> 2047 : 0 | | Exiting trace of bpf_spin_lock With fentry: cpu:/tmp/b# ./funclatency -u bpf_spin_lock Tracing bpf_spin_lock. Hit Ctrl-C to exit ^C usec : count distribution 0 -> 1 : 6371351 |****************************************+| 2 -> 3 : 1100093 |****** | 4 -> 7 : 518197 |*** | 8 -> 15 : 174881 |* | 16 -> 31 : 25022 | | 32 -> 63 : 1553 | | 64 -> 127 : 1312 | | 128 -> 255 : 2376 | | 256 -> 511 : 0 | | Exiting trace of bpf_spin_lock Signed-off-by: Barret Rhoden <[email protected]>
- Loading branch information