perf-stat-hist(8) | System Manager's Manual | perf-stat-hist(8) |
perf-stat-hist - histogram summary of tracepoint values. Uses Linux perf_events.
perf-stat-hist [-h] [-b buckets|-P power] [-m max] tracepoint variable [seconds]
This is a proof-of-concept showing in-kernel histograms using Linux perf_events (aka the "perf" command), on older kernels where perf_events does not have this native capability.
These histograms show the distribution of variable, allowing details including multiple modes and outliers to be studied.
This uses multiple counting tracepoints with different filters, one for each histogram bucket. While this is summarized in-kernel, the use of multiple tracepoints does add addiitonal overhead. Hopefully, in the future this this functionality will be provided in an efficient way from perf_events itself, at which point this tool can be deleted or rewritten.
Linux perf_events: add linux-tools-common, run "perf", then add any additional packages it requests. Also uses awk.
While the counts are performed in-kernel, there is one tracepoint used per histogram bucket, so the overheads are higher than usual (relative to the number of buckets) than function counting using perf stat. The lowest overhead is when -b is used to specify one bucket only, bifurcating statistics.
This is from the perf-tools collection.
Also look under the examples directory for a text file containing example usage, output, and commentary for this tool.
Linux
Unstable - in development.
Brendan Gregg
2014-07-07 | USER COMMANDS |