Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
CPU sampling (profiling) at a timed interval #330
Support for CPU profiling, like "perf record -F 99 -a -g -- sleep 10". The advantage of bcc/eBPF is efficiency: stack traces can be frequency counted in kernel context (an eBPF map), and only the summary emitted to user level. The current operation of perf_events is to write a perf.data file with every stack sample, which involves extra CPU and file system overhead (context switches have been minimized thanks to perf's dynamic wakeups).
While this will be an everyday feature, I've put the priority as medium and not high because Linux perf_events is an adequate workaround for now.
Yes, my systems are NO_HZ.
I wanted to add top use cases, imagine these are all sampled at 99 Hertz:
The first 4 should be doable right away. Not sure about 5 & 6 without task_struct access.