Repository navigation
[replay #17411] Cargo profiling improvements - #11
Closed
ved-merget wants to merge 1 commit into
Closed
ved-merget wants to merge 1 commit into
ved-merget wants to merge 1 commit into
Conversation
### What does this PR try to resolve? This PR makes a couple of small improvements to our profiling by: 1. Removing/modifying `trace!()` calls that log large objects (`UnitGraph`) or all called from a hot loop (in the case of `build_sbom_graph`) 2. Added more detailed instrumentation to the `fn compile()` while trying to avoid instrumenting leaf functions. Below are some tracing examples from using profiling on the Zed repository. **Before** <img width="2068" height="502" alt="image" src="https://github.com/user-attachments/assets/48f85737-e6cd-4fcf-b792-e8126d94c8a4" /> **After** <img width="2067" height="501" alt="image" src="https://github.com/user-attachments/assets/b82be28b-1268-40c6-9a66-4397c76b2cdc" /> ### How to test and review this PR? `CARGO_LOG_PROFILE=true CARGO_LOG_PROFILE_CAPTURE_ARGS=true cargo build` on your favorite repo :)
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.
Replay of rust-lang/cargo#17411 (4 files): its net change applied onto the common base
0b47ab4fc947679d5af9b7e5382e05e1484e1984so this branch is a sibling of the other replays. Generated by merget-harnessmh bench; this mirror is disposable.