Profiling with Linux perf tool
A technical guide on using the Linux perf utility to analyze server performance and identify code bottlenecks.
Frequency Based Sampling
Recording a sample
sudo perf record -p ${pidof mysqld} -g -o sample.perf -- sleep 5Viewing a sample
sudo chown $USER: sample.perf
perf report -i sample.perf -gperf report -i sample.perf -g --no-childrenDynamic Tracepoints
Adding dynamic tracepoints
Viewing the tracepoints
Running the profiler
Examining the trace
Last updated
Was this helpful?

