-
Notifications
You must be signed in to change notification settings - Fork 53
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
Support searching for and demangling symbols #62
Conversation
This adds an API for demangling a stream of data which consists of a mix of mangled and non-mangled symbols. This is gated behind a new Cargo feature ("std") since the new API uses I/O traits and allocates memory. This API is broadly useful for any downstream users that are processing streams with interleaved symbols (e.g., perf script output) and don't want to filter down ahead of time. Previously the best option for this (to my knowledge) was either shelling out to the `rustfilt` binary or copying an implementation much like it. The implementation added in this commit is roughly 2x faster than that in the rustfilt binary today; if this is accepted moving rustfilt to use this will make sense.
Fuzz target failure looks unrelated to this PR - probably upstream change? I ran the fuzzing locally and it seems to be fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me! Could you update the version of cargo-fuzz
installed in CI? That should fix the fuzz failure.
Alright, CI is passing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll leave that part up to you then as to whether to push the stream further down.
I'll probably look into optimizing further since waiting 20+ seconds for demangling isn't fun, but in any case I think we can probably merge this - did you want me to do merge + publish for you? I technically have the right access through infra but the ownership for this crate feels somewhat unclear today. |
Sure yeah that'd be appreciated! |
Alright, merged this and publish 0.1.22 with the new APIs. Thanks! |
This adds an API for demangling a stream of data which consists of a mix of mangled and non-mangled symbols. This is gated behind a new Cargo feature ("std") since the new API uses I/O traits and allocates memory.
This API is broadly useful for any downstream users that are processing streams with interleaved symbols (e.g., perf script output) and don't want to filter down ahead of time. Previously the best option for this (to my knowledge) was either shelling out to the
rustfilt
binary or copying an implementation much like it.The implementation added in this commit is roughly 2x faster than that in the rustfilt binary today (on a test input I have 40 seconds -> 20 seconds); if this is accepted moving rustfilt to use this will probably make sense.