Flame Graphs


CPU Flame Graph

Flame graphs are a visualization of profiled software, allowing the most frequent code-paths to be identified quickly and accurately. They can be generated using my open source programs on github.com/brendangregg/FlameGraph, which create interactive SVGs. See the Updates section for other implementations.

The following pages (or posts) introduce different types of flame graphs:

The example on the right is a portion of a CPU flame graph, showing MySQL codepaths that are consuming CPU cycles, and by how much.

Summary

The x-axis shows the stack profile population, sorted alphabetically (it is not the passage of time), and the y-axis shows stack depth. Each rectangle represents a stack frame. The wider a frame is is, the more often it was present in the stacks. The top edge shows what is on-CPU, and beneath it is its ancestry. The colors are usually not significant, picked randomly to differentiate frames.

This visualization is fully explained in my ACMQ article The Flame Graph, also published in Communications of the ACM, Vol. 59 No. 6.

Also see my CPU Flame Graphs page, and the presentation below.

Operating Systems

Flame graphs can be generated from any profile data that contains stack traces, including from the following profiling tools:

Once you have a profiler that can generate meaningful stacks, converting them into a flame graph is usually the easy step.

Presentation

My talk for USENIX/LISA13, titled Blazing Performance with Flame Graphs, explains the visualization and summarizes different types:

These slides can also be downloaded as a PDF.

Updates

Flame graphs were released in Dec 2011. Not long afterwards (updated in 2012):

More Flame Graph news (updated Apr 2013):

More Flame Graph news (updated Aug 2013):

More Flame Graph news (updated Jan 2014):

More Flame Graph news (updated Jun 2014):

More Flame Graph news (updated Nov 2014):

More Flame Graph news (updated May 2015):

More Flame Graph news (updated Jul 2015):

More Flame Graph news (updated Aug 2015):

More Flame Graph news (updated Oct 2015):

More Flame Graph news (updated Dec 2015):

More Flame Graph news (updated Apr 2016):

More Flame Graph news (updated Jun 2016):

More Flame Graph news (updated Jul 2016):

Thanks to everyone who has written about flame graphs, developed them further, and shared their results! I'll update this page from time to time with more news.


Last updated: 27-Jul-2016