Adding a "Inverted Tree" Mode
Author: michaeleiselCreated Jan 31, 2025Updated Feb 15, 2026
It can sometimes be helpful to invert a flamegraph to find functions that per-call are not that expensive, but that are called all over the place, and those calls in total add up to something substantial (e.g. malloc). This is different from "icicle" flamegraphs, which just flip the y-axis, and are instead a new tree. If we think about a flamegraph in the .folded form:
foo;bar 5
foo;bar;baz 10
...An inverted tree is just what we get when we reverse the order of function calls within each line (bar;foo 5 etc.).
Source: jlfwong/speedscope