Quick answer: Flame graphs show per-call CPU cost in one visual. For game performance, they collapse a complex frame into a single image you can read at a glance.

Numerical profiler output is hard to scan. A flame graph of one frame shows the cost shape immediately.

Capture per-frame samples

Sample stack at 1000Hz for 5 seconds; collapse into flame graph format. Tools like flamegraph from Brendan Gregg convert.

Read width as time

Width of each block = total time in that function. Wide blocks at top of frames = your bottlenecks.

Compare before/after

Side-by-side flame graphs make optimization wins visible. Before: 30% in update; after: 8%. Easier to communicate than 'we made it faster'.

Tag with build SHA

Each flame graph belongs to a specific build. Tag the SHA in the filename; tracking optimization progress over time becomes possible.

“Flame graphs make CPU shape visible. Visible problems are solvable problems.”

Make flame graph generation part of your performance test suite. The visual is the artifact; share it with the team.

Related reading