Flame Graph
A performance analysis visualization technique that aggregates a large number of stack samples. The vertical axis represents call stack depth, while the width of each frame corresponds to the proportion of samples in which that function appears, allowing performance hotspots to be located quickly.
Timeline (last 90 days)
The flame graph was proposed by Brendan Gregg in 2011; it is a technique for visualizing a large number of aggregated call stack samples, with the vertical axis being call stack depth, the horizontal axis arranged by function name in lexicographic order with samples merged, and frame width corresponding to the proportion of all samples in which the function appears.
The horizontal order of a flame graph does not represent execution order, and call order cannot be inferred from it; it reflects CPU usage and is usually blind to time blocked waiting for I/O, so it often needs to be combined with blocking analysis or asynchronous tracing.
Recommended workflow: use the 3.15 sampling profiler to collect data, generate a flame graph to locate macroscopic bottlenecks, then use a source heatmap to pinpoint code lines precisely.
When reading a flame graph, first focus on wide and flat frames (representing hot functions that appear repeatedly across multiple call paths), then compare the widths of frames at the same level horizontally to find the branch with the highest share of time consumption.
The flame graph provided by Simon Willison is presented in HTML form and supports interactive exploration, while the heatmap shows the heat distribution of source code lines in the form of a directory index.
All Facts (5)
The flame graph was proposed by Brendan Gregg in 2011; it is a technique for visualizing a large number of aggregated call stack samples, with the vertical axis being call stack depth, the horizontal axis arranged by function name in lexicographic order with samples merged, and frame width corresponding to the proportion of all samples in which the function appears.
50%UnverifiedThe horizontal order of a flame graph does not represent execution order, and call order cannot be inferred from it; it reflects CPU usage and is usually blind to time blocked waiting for I/O, so it often needs to be combined with blocking analysis or asynchronous tracing.
50%UnverifiedRecommended workflow: use the 3.15 sampling profiler to collect data, generate a flame graph to locate macroscopic bottlenecks, then use a source heatmap to pinpoint code lines precisely.
50%UnverifiedWhen reading a flame graph, first focus on wide and flat frames (representing hot functions that appear repeatedly across multiple call paths), then compare the widths of frames at the same level horizontally to find the branch with the highest share of time consumption.
50%UnverifiedThe flame graph provided by Simon Willison is presented in HTML form and supports interactive exploration, while the heatmap shows the heat distribution of source code lines in the form of a directory index.
50%