Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a "Inverted Tree" Mode #497

Open
michaeleisel opened this issue Jan 31, 2025 · 2 comments
Open

Adding a "Inverted Tree" Mode #497

michaeleisel opened this issue Jan 31, 2025 · 2 comments

Comments

@michaeleisel
Copy link

michaeleisel commented Jan 31, 2025

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.).

@jlfwong
Copy link
Owner

jlfwong commented Jan 31, 2025

Hi @michaeleisel! A variant of this is available in the sandwich view. If you click on one of the rows, you get a flamegraph & an inverted flamegraph rooted at the node selected

Image

Does that satisfy your use case?

@michaeleisel
Copy link
Author

I think I see what you're saying, that the "callers" section would contain all the callers for a particular stack frame. That is potentially helpful, but in general I would prefer to see the whole tree inverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants