Repository navigation
Add opt-in caching for shared DWARF abbreviations - #788
Open
anik-dasgupta wants to merge 1 commit into
Open
anik-dasgupta wants to merge 1 commit into
anik-dasgupta wants to merge 1 commit into
Conversation
When `RUST_LIB_BACKTRACE_CACHE_SHARED_ABBREVIATIONS` is present, populate gimli's abbreviation cache with `AbbreviationsCacheStrategy::Duplicates` before constructing the addr2line context. This lets compilation units sharing an abbreviation table reuse its parsed representation.
Member
|
This PR does not motivate why it uses an environment variable. See the rust-lang/rust LLM usage policy. I intend to remove this as a separate repo, which is why I have not bothered to formally note that I intend for it to be applied here. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Populate gimli's abbreviation cache with
AbbreviationsCacheStrategy::Duplicatesbefore constructing the addr2line context whenRUST_LIB_BACKTRACE_CACHE_SHARED_ABBREVIATIONSis present.This allows compilation units that reference the same
.debug_abbrevtable to reuse its parsed representation. LLVM BOLT's-update-debug-sectionscan produce such shared tables. TheDuplicatesstrategy caches only abbreviation offsets referenced by multiple units.Testing
Passed on macOS:
cargo fmt --all -- --checkcargo testRUST_LIB_BACKTRACE_CACHE_SHARED_ABBREVIATIONS=1 cargo test