Files
perf-tools/README.md

21 lines
1.8 KiB
Markdown
Raw Normal View History

2014-07-10 12:54:14 -07:00
perf-tools
==========
2014-07-12 17:54:33 -07:00
A miscellaneous collection of in-development and unsupported performance analysis tools for Linux perf_events, aka the "perf" command, and ftrace. Written by Brendan Gregg (author of the DTraceToolkit).
2014-07-10 12:56:44 -07:00
2014-07-12 17:54:33 -07:00
These tools are designed to be simple to use, and provide advanced performance observability. They are written for Linux systems, for times when perf_events or ftrace are the best tracing options available.
2014-07-10 12:56:44 -07:00
## Contents
- misc/__perf-stat-hist__: power-of aggregations for tracepoint variables
2014-07-12 17:54:33 -07:00
## Tool Internals and Overhead
2014-07-10 12:56:44 -07:00
2014-07-12 17:56:49 -07:00
perf_events is evolving. This collection began developent on Linux 3.16, where perf_events lacks certain programmatic capabilities (eg, custom in-kernel aggregations). It's possible these will be added in a forthcoming kernel release. Until then, many of these tools employ workarounds, tricks, and hacks in order to work. This includes passing event data to user space for post-processing, which incurs much higher overhead than in-kernel aggregations.
WARNING: In extreme cases, your target application may run 5x slower when using these tools. Read the program header for warnings, and test before use.
2014-07-10 12:56:44 -07:00
2014-07-12 17:54:33 -07:00
If the overhead is a problem, these tools can be improved. If a tool doesn't already, it could be rewritten in C to use perf_events_open() and mmap() for the trace buffer. It could also implement frequency counts in C, and operate on mmap() directly, rather than using awk/Perl/Python.
2014-07-10 12:56:44 -07:00
2014-07-12 17:56:49 -07:00
Over time, it is expected that more of these tools can be substantially rewritten to use more efficient perf_events and ftrace features. Any tool you find in this collection which involves user space processing in awk/Perl/Python should be considered a temporary workaround for older kernel versions, and will be kept in this collection for older kernels alongside the newer tools.