Skip to content

hotspot - GUI for Linux perf Profiles Cheatsheet

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

PlatformCommand
Debian/Ubuntusudo apt install hotspot
Fedorasudo dnf install hotspot
Arch Linuxsudo pacman -S hotspot
AppImagedownload from the GitHub Releases page (portable)
Requireslinux-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 flagPurpose
--call-graph dwarfBest stack unwinding (needs debug info)
--call-graph fpFrame-pointer unwinding (faster, needs -fno-omit-frame-pointer)
-F 999Sample at 999 Hz
-p PIDRecord a running process
-gEnable call graphs

Views

ViewShows
SummarySample counts, threads, hottest symbols
Flame GraphAggregated stacks; width = time
Top DownCall tree from roots to leaves
Bottom UpHot leaf functions and their callers
Caller/CalleePer-symbol inbound/outbound cost
TimelinePer-thread activity over time
ActionUse
Click a frameZoom the flame graph into that subtree
SearchFilter symbols by name
Select time range (timeline)Focus analysis on a phase
Invert (bottom-up)Find expensive leaf functions
Filter by thread/processIsolate 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

NeedDo
Readable symbolsBuild with debug info (-g), don’t strip
Deep stacks--call-graph dwarf
Cheap stacksFrame pointers + --call-graph fp
Kernel symbolssysctl kernel.kptr_restrict=0, run perf as root
perf permissionssysctl 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

Aspecthotspotperf reportFlameGraph scriptssamply
UIQt GUITUI/textStatic SVGFirefox Profiler
Off-CPUYesLimitedManualLimited
Records for youYesN/A (perf)NoYes
Best forInteractive perf analysisQuick text viewShareable SVGsCross-platform

Resources