$linuxjunkies
>

flame graph

also: CPU flame graph, stack trace visualization

A visualization technique that displays CPU time spent in functions as a stacked area chart, where the width of each block represents the amount of time spent in that function and its callees.

A flame graph is a performance profiling tool that helps identify where a program spends its CPU time. It combines stack trace samples collected during program execution into a single visualization showing the call stack hierarchy.

Each row represents a function in the call stack, with the x-axis representing time (or sample count) and the width of each colored block showing how much CPU time was consumed. The y-axis shows the call stack depth—functions that call other functions appear above their callees. This makes it easy to spot hot spots: wide blocks indicate functions consuming significant CPU resources.

Flame graphs are typically generated using profiling tools like perf, systemtap, or specialized profilers, then rendered with tools like Brendan Gregg's flamegraph.pl. For example, profiling a web server might reveal that 60% of CPU time is spent in a database query function, immediately visible as a wide block in the graph.

Related terms