-
Notifications
You must be signed in to change notification settings - Fork 147
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
Flamegraph takes a really long time to generate the svg #199
Comments
perf's approach of running Is your app open source? I'm currently collecting reproducible instances of perf slowness because I'm considering to work on a faster replacement. |
Fixing this is outside of the scope of cargo-flamegraph though, short of switching to a faster perf alternative (once one exists). |
So I guess that's the worst stacks. It's not open source but I might be able to reproduce it with about a days worth of work. |
That sounds amazing!
Yeah, there's not much we can do in flamegraph. Going to close this (but feel free to keep discussing possible strategies here). |
@mstange |
Well, that's a bit weird. The stacks shouldn't be that much worse - they should just be missing function calls that were inlined away by the compiler. But the overall symbols should still make sense. You could check whether your binaries contain the symbols you'd expect, by running
Anyway, the first pieces of my perf.data parser are here: https://github.com/mstange/linux-perf-data |
Sharing here because I had a related issue on Ubuntu 22.04 with Updating to Ubuntu 23.04 seems to have fixed for me. I think the root cause was this binutils bug https://sourceware.org/bugzilla/show_bug.cgi?id=28588, which lists the affected version as binutils 2.38 (which is what ships in Ubuntu 22.04). The fix commit listed in that bug report shipped in binutils 2.39. Ubuntu 23.04 has binutils 2.40. |
I'm just running
cargo-flamegraph flamegraph
letting my application run for 10 seconds and closing the application.At the end I see
Maybe that's a lot but I'm using default settings so IDK.
Now it's just constantly running a single addr2line and then respawning a new one...
These are taken several minutes apart.. So I'm kinda getting bottle-necked by this single-threaded addr2line process.
I ran it 40 minutes ago and it's still stuck on that perf record captured and wrote line. I can press Ctrl+C and it will generate an SVG but they are pretty clearly not accurate and they have a lot of [unknown] sections.
It's a vulkan based game engine, so maybe the raw amount of complexity is causing this issue. Cause calling vulkan methods will often call quite complicated driver functions and the stack traces can sometimes get funky.
Also I'm using a Ryzen 9 5950x and I have 32 Gigs of ram, and I only have SSDs.
The text was updated successfully, but these errors were encountered: