llcstat(8) | System Manager's Manual | llcstat(8) |
llcstat - Summarize CPU cache references and misses by process. Uses Linux eBPF/bcc.
llcstat [-h] [-c SAMPLE_PERIOD] [duration]
llcstat instruments CPU cache references and cache misses system-side, and summarizes them by PID and CPU. These events have different meanings on different architecture. For x86-64, they mean misses and references to LLC. This can be useful to locate and debug performance issues caused by cache hit rate.
This works by sampling corresponding events defined in uapi/linux/perf_event.h, namely PERF_COUNT_HW_CACHE_REFERENCES and PERF_COUNT_HW_CACHE_MISSES, using BPF perf event tracing. Upon each sampled event, the attached BPF program records the PID and CPU ID on which the event happened, and stores it in table.
This makes use of a Linux 4.9 feature (BPF_PROG_TYPE_PERF_EVENT).
Since this uses BPF, only the root user can use this tool.
CONFIG_BPF and bcc.
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.
Teng Qin
2015-08-18 | USER COMMANDS |