Why it matters

Flame graphs reveal hot paths visually. Great for CPU-side of LLM stack.

Advertisement

The architecture

Capture stack samples; aggregate; render as flame graph.

Wide = hot; tall = deep.

Flame graphs flowCapture samplesperf, py-spyAggregatecollapse stacksRenderflame graph SVGBrendan Gregg pioneered; use for CPU side of LLM tokenizer/data pipeline
Flame graphs flow.
Advertisement

How it works end to end

py-spy dump --pid.

flamegraph.pl.

View SVG in browser.