feat: add persistent DWARF analysis cache#247
Draft
swananan wants to merge 1 commit into
Draft
Conversation
Owner
Author
Nginx benchmark noteI tested the PR against the existing OpenResty nginx worker:
Results:
The cache hit was confirmed in the runtime log, but this target was about 10% The current payload repeats file-path and compilation-unit strings across about |
Add a rootless prepare mode that serializes target-independent DWARF analysis and reuses it during later CLI and TUI startup. Validate cache identity and bounds, fall back to raw DWARF for unusable entries, and report hit, miss, and rejection states.
ceb8a56 to
36201d2
Compare
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
--prepare --targetmode for parsed DWARF analysisDesign
The cache stores only target-independent symbol, source-line, file, and
compilation-unit indices. Trace sessions open it read-only and continue to
resolve runtime modules,
dlopenchanges, CFI rows, symbolization, kernelcapabilities, and attachment state through the existing runtime paths.
Entries use a versioned fixed header and binary/debug-file identities. Decoding
validates size limits and identity before deserializing the payload. Missing or
unusable entries fall back to raw DWARF without turning a successful module
load into an error.
This intentionally does not serialize eBPF bytecode or runtime backtrace state.
Testing
cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warnings05441fe22415Container-topology e2e was not run because this change does not alter container
or PID-namespace behavior.
Related to #240