Tools Practical By Samson Tanimawo, PhD Published Apr 30, 2026 4 min read

perf for CPU Profiling

perf identifies hot functions.

Record

perf record -p PID -g -- sleep 30 captures 30 seconds.

-g for call graphs.

Report

perf report shows hot functions.

perf script for raw output for FlameGraph.

Careful

Production overhead is small but not zero.

Use during reproducible high-CPU events.