hotspot - GUI for Linux perf Profiles Cheatsheet
hotspot (by KDAB) is a Qt GUI for the Linux perf profiler. You record with perf record as usual, then open the resulting perf.data in hotspot to explore it as interactive flame graphs, top-down and bottom-up call trees, caller/callee views, per-thread timelines, and off-CPU analysis. It turns the hard-to-read output of perf report into a visual, navigable profile — and it can even launch and record perf for you.
Installation
| Platform | Command |
|---|
| Debian/Ubuntu | sudo apt install hotspot |
| Fedora | sudo dnf install hotspot |
| Arch Linux | sudo pacman -S hotspot |
| AppImage | download from the GitHub Releases page (portable) |
| Requires | linux-perf / perf installed |
Recording (Two Ways)
# Option A: record with perf, then open in hotspot
perf record --call-graph dwarf -F 999 ./my-program args
hotspot perf.data
# Option B: let hotspot record for you (GUI "Record" tab)
hotspot # choose the binary, options, and hit Record
| perf flag | Purpose |
|---|
--call-graph dwarf | Best stack unwinding (needs debug info) |
--call-graph fp | Frame-pointer unwinding (faster, needs -fno-omit-frame-pointer) |
-F 999 | Sample at 999 Hz |
-p PID | Record a running process |
-g | Enable call graphs |
Views
| View | Shows |
|---|
| Summary | Sample counts, threads, hottest symbols |
| Flame Graph | Aggregated stacks; width = time |
| Top Down | Call tree from roots to leaves |
| Bottom Up | Hot leaf functions and their callers |
| Caller/Callee | Per-symbol inbound/outbound cost |
| Timeline | Per-thread activity over time |
Navigating
| Action | Use |
|---|
| Click a frame | Zoom the flame graph into that subtree |
| Search | Filter symbols by name |
| Select time range (timeline) | Focus analysis on a phase |
| Invert (bottom-up) | Find expensive leaf functions |
| Filter by thread/process | Isolate a worker |
Off-CPU Analysis
hotspot can visualize where threads were blocked (waiting), not just burning CPU — useful for latency problems.
# Record scheduler switches for off-CPU insight
perf record --call-graph dwarf -e cycles \
-e sched:sched_switch --switch-events ./my-program
hotspot perf.data
Getting Good Stacks
| Need | Do |
|---|
| Readable symbols | Build with debug info (-g), don’t strip |
| Deep stacks | --call-graph dwarf |
| Cheap stacks | Frame pointers + --call-graph fp |
| Kernel symbols | sysctl kernel.kptr_restrict=0, run perf as root |
| perf permissions | sysctl kernel.perf_event_paranoid=1 (or lower) |
Common Workflows
# Profile a CPU-bound program and explore the flame graph
perf record --call-graph dwarf -F 999 ./app
hotspot perf.data
# Investigate why a request is slow (blocked/off-CPU time)
perf record --call-graph dwarf -e sched:sched_switch --switch-events ./server
hotspot perf.data # inspect the off-CPU flame graph
hotspot vs Other perf Front Ends
| Aspect | hotspot | perf report | FlameGraph scripts | samply |
|---|
| UI | Qt GUI | TUI/text | Static SVG | Firefox Profiler |
| Off-CPU | Yes | Limited | Manual | Limited |
| Records for you | Yes | N/A (perf) | No | Yes |
| Best for | Interactive perf analysis | Quick text view | Shareable SVGs | Cross-platform |
Resources