gimli: Implement symbol table searches on macOS #300
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If dwarf debug info isn't available we fall back to searching the symbol
table. Typically this is done with
dladdr
on most platforms but withgimli we typically have all the infrastructure already in place to do
the search ourselves. This functionality was already filled out on
Linux and Windows, but it wasn't implemented on macOS yet because it
wasn't necessary.
Implementing a pretty simple version, however, shows substantial
speedups for the various benchmarks. Presumably
dladdr
isn't exactlythe fastest thing in the world and our sorted list search which is
cached must be much faster here!
The current comparison of before/after this change looks like: