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

Switch addr2line to use EndianReader. #213

Merged
merged 2 commits into from
Apr 23, 2021

Conversation

vlovich
Copy link

@vlovich vlovich commented Apr 21, 2021

Avoid copying the debug into RAM & instead use borrows to utilize the 0-copy facility of gimli.
Resolves #212

@vlovich
Copy link
Author

vlovich commented Apr 21, 2021

Hey @philipc, this diff on my binary is crashing at thread 'main' panicked at 'called Option::unwrap()on aNone value', examples/addr2line.rs:99:46. The section name is .debug_loclists (prior to that it successfully loads .debug_loc). I was wondering if you had any insights on where I have a mistake in this PR.

examples/addr2line.rs Outdated Show resolved Hide resolved
@vlovich
Copy link
Author

vlovich commented Apr 22, 2021

Sweet that worked! I can confirm memory usage drops 3x & is now better than llvm-symbolizer. Runtime is similarly ~3x faster.

@vlovich
Copy link
Author

vlovich commented Apr 22, 2021

Hmm... some weird test failures I'm unable to reproduce locally (running Arch)

@philipc
Copy link
Contributor

philipc commented Apr 23, 2021

CI works. Probably it's the output equivalence test, which depends on the binutils version, since we are comparing our output with it.

examples/addr2line.rs Outdated Show resolved Hide resolved
examples/addr2line.rs Outdated Show resolved Hide resolved
examples/addr2line.rs Outdated Show resolved Hide resolved
@vlovich vlovich force-pushed the zero-copy-addr2line branch from b62f16b to 377dc0f Compare April 23, 2021 01:22
vlovich added 2 commits April 22, 2021 20:53
Avoid copying the debug into RAM & instead use borrows to utilize the
0-copy facility of gimli.
@vlovich vlovich force-pushed the zero-copy-addr2line branch from 377dc0f to e83963e Compare April 23, 2021 03:53
Copy link
Contributor

@philipc philipc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@philipc philipc merged commit 72a7c69 into gimli-rs:master Apr 23, 2021
@vlovich vlovich deleted the zero-copy-addr2line branch April 23, 2021 14:41
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

Successfully merging this pull request may close these issues.

Doesn't seem to live up to performance claims?
2 participants