Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Replace original FlameGraph with Rust port #211
Inferno is a Rust port of the original FlameGraph, mainly focussing on performance.
The conversion to using Inferno was super easy and provides the same functionality. This would get rid of the requirement for perl to be installed and means we can get rid of the vendored code.
However, there currently seems to be a bug where an extra stack line is added. I'm not sure why but I'm looking into it when I get a chance.
@neosilky - nice work on this! your change inspired me to try to do the same with py-spy.
I figured out that the extra stack line is because of a trailing ';' when building up the frame (this line on the final iteration) - which seems to make a difference with inferno but not so much with the vendored flamegraph code.
I have a PR with py-spy benfred/py-spy#114 that fixes this - and also doesn't write out a temporary file (using inferno from_lines to create). Feel free to copy anything you find useful from it, the flamegraph code in py-spy was copied from rbspy originally so should be basically the same. Eventually I'd like to merge these into a common crate (when I some more free time)
@jonhoo Ah, I switched to joining each frame by a
So maybe the easiest thing here is to get Inferno to ignore final
May 20, 2019
@neosilky ah, I see, you specifically have a "function" in the stack trace that contains spaces, is last, and ends with a number -- yeah, that would cause some oddity. I guess the trailing