Repository navigation
More opt-dist improvements - #165849
Merged
Merged
More opt-dist improvements#165849
Conversation
By default, we optimize cargo and thus need to run the stage2 PGO-instrumented cargo binary to get its profiles. When we opt out of that, we don't have a stage2 cargo, and don't need it, so we just use the regular stage0 cargo there.
Collaborator
|
Some changes occurred in src/tools/opt-dist cc @Kobzol |
Collaborator
|
|
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Nov 12, 2026
More opt-dist improvements Following up on rust-lang#165561, this PR fixes a small issue I saw locally: since we can now choose whether to optimize cargo, we need to pick the correct stage to pass to the collector when running benchmarks. We want the instrumented stage2 most of the time (e.g. on CI) but locally, we most likely don't want to instrument cargo and thus want to use stage0 (there won't be a stage2 cargo anyways) (I've removed the second commit as I want to test it more on actual CI, so not in this PR) r? kobzol
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
…uwer Rollup of 12 pull requests Successful merges: - #164707 (Re-enable rustc profile generation for static linked llvm on Windows x64 builds ) - #165221 (Canonicalize more comparison operators) - #165880 (Remove dead code for returning `BackendRepr::Memory` with `PassMode::Direct`) - #164108 (Add unstable `-Zllvm-tpde` flag to `rustc_codegen_llvm`) - #165565 (view-types: lower view types from HIR) - #165771 (tests: cover MSVC ThinLTO exported symbol preservation) - #165810 (reflection: reflect attributes from adts, fields, and variants) - #165823 (Tweak crate error wording and turn them into fatal errors) - #165849 (More opt-dist improvements) - #165855 (Update `sysinfo` version to `0.40.3`) - #165861 (cg_llvm: Use an invariant lifetime brand for LLVM attributes) - #165872 (Some attribute related cleanups)
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Nov 13, 2026
More opt-dist improvements Following up on rust-lang#165561, this PR fixes a small issue I saw locally: since we can now choose whether to optimize cargo, we need to pick the correct stage to pass to the collector when running benchmarks. We want the instrumented stage2 most of the time (e.g. on CI) but locally, we most likely don't want to instrument cargo and thus want to use stage0 (there won't be a stage2 cargo anyways) (I've removed the second commit as I want to test it more on actual CI, so not in this PR) r? kobzol
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
Rollup of 13 pull requests Successful merges: - #164707 (Re-enable rustc profile generation for static linked llvm on Windows x64 builds ) - #165068 (Change color usage for highlights) - #165841 (Tell Miri about the alignment handling in the Windows System allocator) - #165880 (Remove dead code for returning `BackendRepr::Memory` with `PassMode::Direct`) - #164108 (Add unstable `-Zllvm-tpde` flag to `rustc_codegen_llvm`) - #165565 (view-types: lower view types from HIR) - #165622 (small cleanups in rustc_codegen_llvm) - #165771 (tests: cover MSVC ThinLTO exported symbol preservation) - #165810 (reflection: reflect attributes from adts, fields, and variants) - #165823 (Tweak crate error wording and turn them into fatal errors) - #165849 (More opt-dist improvements) - #165855 (Update `sysinfo` version to `0.40.3`) - #165872 (Some attribute related cleanups) Failed merges: - #165861 (cg_llvm: Use an invariant lifetime brand for LLVM attributes)
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Nov 13, 2026
More opt-dist improvements Following up on rust-lang#165561, this PR fixes a small issue I saw locally: since we can now choose whether to optimize cargo, we need to pick the correct stage to pass to the collector when running benchmarks. We want the instrumented stage2 most of the time (e.g. on CI) but locally, we most likely don't want to instrument cargo and thus want to use stage0 (there won't be a stage2 cargo anyways) (I've removed the second commit as I want to test it more on actual CI, so not in this PR) r? kobzol
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
Rollup of 11 pull requests Successful merges: - #165068 (Change color usage for highlights) - #165841 (Tell Miri about the alignment handling in the Windows System allocator) - #165880 (Remove dead code for returning `BackendRepr::Memory` with `PassMode::Direct`) - #164108 (Add unstable `-Zllvm-tpde` flag to `rustc_codegen_llvm`) - #165565 (view-types: lower view types from HIR) - #165622 (small cleanups in rustc_codegen_llvm) - #165771 (tests: cover MSVC ThinLTO exported symbol preservation) - #165810 (reflection: reflect attributes from adts, fields, and variants) - #165849 (More opt-dist improvements) - #165855 (Update `sysinfo` version to `0.40.3`) - #165872 (Some attribute related cleanups) Failed merges: - #165861 (cg_llvm: Use an invariant lifetime brand for LLVM attributes)
Member
|
@bors try jobs=test-various |
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
More opt-dist improvements try-job: test-various
This comment has been minimized.
This comment has been minimized.
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Nov 13, 2026
More opt-dist improvements Following up on rust-lang#165561, this PR fixes a small issue I saw locally: since we can now choose whether to optimize cargo, we need to pick the correct stage to pass to the collector when running benchmarks. We want the instrumented stage2 most of the time (e.g. on CI) but locally, we most likely don't want to instrument cargo and thus want to use stage0 (there won't be a stage2 cargo anyways) (I've removed the second commit as I want to test it more on actual CI, so not in this PR) r? kobzol
Contributor
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
…uwer Rollup of 18 pull requests Successful merges: - #164828 (When suggesting path of renamed crate, use the renamed name) - #164864 (Avoid hoisting uninitialized reads in EarlyOtherwiseBranch) - #165068 (Change color usage for highlights) - #165221 (Canonicalize more comparison operators) - #165841 (Tell Miri about the alignment handling in the Windows System allocator) - #165869 (Cleanup: Remove `path_matches` and `value_str` from `AttributeExt`) - #165880 (Remove dead code for returning `BackendRepr::Memory` with `PassMode::Direct`) - #164108 (Add unstable `-Zllvm-tpde` flag to `rustc_codegen_llvm`) - #165565 (view-types: lower view types from HIR) - #165622 (small cleanups in rustc_codegen_llvm) - #165745 (Don't ICE when a guard condition is a place of type `!`) - #165771 (tests: cover MSVC ThinLTO exported symbol preservation) - #165810 (reflection: reflect attributes from adts, fields, and variants) - #165823 (Tweak crate error wording and turn them into fatal errors) - #165849 (More opt-dist improvements) - #165855 (Update `sysinfo` version to `0.40.3`) - #165872 (Some attribute related cleanups) - #165905 (CI: Use a consistent locale when sorting docker build inputs)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
…uwer Rollup of 17 pull requests Successful merges: - #164828 (When suggesting path of renamed crate, use the renamed name) - #164864 (Avoid hoisting uninitialized reads in EarlyOtherwiseBranch) - #165068 (Change color usage for highlights) - #165221 (Canonicalize more comparison operators) - #165841 (Tell Miri about the alignment handling in the Windows System allocator) - #165869 (Cleanup: Remove `path_matches` and `value_str` from `AttributeExt`) - #165880 (Remove dead code for returning `BackendRepr::Memory` with `PassMode::Direct`) - #164108 (Add unstable `-Zllvm-tpde` flag to `rustc_codegen_llvm`) - #165565 (view-types: lower view types from HIR) - #165622 (small cleanups in rustc_codegen_llvm) - #165771 (tests: cover MSVC ThinLTO exported symbol preservation) - #165810 (reflection: reflect attributes from adts, fields, and variants) - #165823 (Tweak crate error wording and turn them into fatal errors) - #165849 (More opt-dist improvements) - #165855 (Update `sysinfo` version to `0.40.3`) - #165872 (Some attribute related cleanups) - #165905 (CI: Use a consistent locale when sorting docker build inputs)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 13, 2026
Rollup merge of #165849 - lqd:opt-dist-again, r=Kobzol More opt-dist improvements Following up on #165561, this PR fixes a small issue I saw locally: since we can now choose whether to optimize cargo, we need to pick the correct stage to pass to the collector when running benchmarks. We want the instrumented stage2 most of the time (e.g. on CI) but locally, we most likely don't want to instrument cargo and thus want to use stage0 (there won't be a stage2 cargo anyways) (I've removed the second commit as I want to test it more on actual CI, so not in this PR) r? kobzol
github-actions Bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Nov 16, 2026
…uwer Rollup of 17 pull requests Successful merges: - rust-lang/rust#164828 (When suggesting path of renamed crate, use the renamed name) - rust-lang/rust#164864 (Avoid hoisting uninitialized reads in EarlyOtherwiseBranch) - rust-lang/rust#165068 (Change color usage for highlights) - rust-lang/rust#165221 (Canonicalize more comparison operators) - rust-lang/rust#165841 (Tell Miri about the alignment handling in the Windows System allocator) - rust-lang/rust#165869 (Cleanup: Remove `path_matches` and `value_str` from `AttributeExt`) - rust-lang/rust#165880 (Remove dead code for returning `BackendRepr::Memory` with `PassMode::Direct`) - rust-lang/rust#164108 (Add unstable `-Zllvm-tpde` flag to `rustc_codegen_llvm`) - rust-lang/rust#165565 (view-types: lower view types from HIR) - rust-lang/rust#165622 (small cleanups in rustc_codegen_llvm) - rust-lang/rust#165771 (tests: cover MSVC ThinLTO exported symbol preservation) - rust-lang/rust#165810 (reflection: reflect attributes from adts, fields, and variants) - rust-lang/rust#165823 (Tweak crate error wording and turn them into fatal errors) - rust-lang/rust#165849 (More opt-dist improvements) - rust-lang/rust#165855 (Update `sysinfo` version to `0.40.3`) - rust-lang/rust#165872 (Some attribute related cleanups) - rust-lang/rust#165905 (CI: Use a consistent locale when sorting docker build inputs)
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.
Following up on #165561, this PR fixes a small issue I saw locally: since we can now choose whether to optimize cargo, we need to pick the correct stage to pass to the collector when running benchmarks. We want the instrumented stage2 most of the time (e.g. on CI) but locally, we most likely don't want to instrument cargo and thus want to use stage0 (there won't be a stage2 cargo anyways)
(I've removed the second commit as I want to test it more on actual CI, so not in this PR)
r? kobzol