-
Notifications
You must be signed in to change notification settings - Fork 23
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
Remove ResolverMap and more #162
Conversation
With commit a03c15e ("Remove 'symbolize' feature") we simplified the conditional compilation logic and that enables us to expose the ElfBackend enum from the elf module without any conflicts/potentially unresolved dependencies. With this change we make use of that fact, by reworking the Inspector internal find_addr logic to use an ElfResolver on all paths. Doing so will make follow on changes more straight forward. Signed-off-by: Daniel Müller <deso@posteo.net>
So far the Inspector type does not report file offset or object file name reporting. With this change we hook up this logic (copying the existing logic from the Symbolizer type). Signed-off-by: Daniel Müller <deso@posteo.net>
By now the Inspector type captures the functionality that Symbolizer::find_addrs provided. Hence, remove the latter and everything associated with it, including ResolverMap (which was only used from this functionality). Signed-off-by: Daniel Müller <deso@posteo.net>
We initially organized benchmarks by source type (e.g., DWARF, Gsym, etc.). However, by now we changed the overall organization of the crate in such a way that different areas of functionality (symbolization, inspection, normalization) are separated. With this change we start organizing benchmarks similarly, by moving the DWARF symbolization benchmark into benches/symbolize. Signed-off-by: Daniel Müller <deso@posteo.net>
This change renames the benches/dwarf module to inspect, in continuation of our effort of restructuring benchmarks. Signed-off-by: Daniel Müller <deso@posteo.net>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #162 +/- ##
==========================================
+ Coverage 74.16% 74.38% +0.21%
==========================================
Files 28 27 -1
Lines 4382 4345 -37
==========================================
- Hits 3250 3232 -18
+ Misses 1132 1113 -19
☔ View full report in Codecov by Sentry. |
With this change we move the Gsym symbolization benchmark into benches/symbolize, to co-locate it with other symbolization benchmarks and to follow the organization of the rest of the crate. Signed-off-by: Daniel Müller <deso@posteo.net>
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.
LGTM
let () = syms.iter_mut().for_each(|sym| { | ||
if opts.offset_in_file { | ||
if let Some(off) = resolver.addr_file_off(sym.address) { | ||
sym.file_offset = off; |
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.
just thinking out loud: should we always calculate file_offset and not even have an opts.offset_in_file
?
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.
I suppose we could. Will check how expensive addr_file_off
is and whether configurability has merrit. But let's do that as a follow-on, as the change at hand is effectively only a code "move"/copy.
Please see individual commits for descriptions.