funcinterval(8) | System Manager's Manual | funcinterval(8) |
funcinterval - Time interval between the same function, tracepoint as a histogram.
funcinterval [-h] [-p PID] [-i INTERVAL] [-d DURATION] [-T] [-u] [-m] [-v] pattern
This tool times interval between the same function as a histogram.
eBPF/bcc is very suitable for platform performance tuning. By funclatency, we can profile specific functions to know how latency this function costs. However, sometimes performance drop is not about the latency of function but the interval between function calls. funcinterval is born for this purpose.
This tool uses in-kernel eBPF maps for storing timestamps and the histogram, for efficiency.
WARNING: This uses dynamic tracing of (what can be many) functions, an activity that has had issues on some kernel versions (risk of panics or freezes). Test, and know what you are doing, before use.
Since this uses BPF, only the root user can use this tool.
CONFIG_BPF and bcc.
pattern Function name. -h Print usage message.
This traces kernel functions and maintains in-kernel timestamps and a histogram, which are asynchronously copied to user-space. While this method is very efficient, the rate of kernel functions can also be very high (>1M/sec), at which point the overhead is expected to be measurable. Measure in a test environment and understand overheads before use. You can also use funccount to measure the rate of kernel functions over a short duration, to set some expectations before use.
This is from bcc.
Also look in the bcc distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool.
Linux
Unstable - in development.
Edward Wu
2020-05-27 | USER COMMANDS |