Skip to content

More opt-dist improvements - #165849

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
lqd:opt-dist-again
Nov 13, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
lqd:opt-dist-again

Conversation

@lqd

@lqd lqd commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

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

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.
@rustbot

rustbot commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/tools/opt-dist

cc @Kobzol

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 12, 2026
@rustbot

rustbot commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

kobzol is not on the review rotation at the moment.
They may take a while to respond.

@Kobzol Kobzol left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks!

@bors r+ rollup

View changes since this review

@rust-bors

rust-bors Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 00bbf35 has been approved by Kobzol

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 12, 2026
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)
@JonathanBrouwer

Copy link
Copy Markdown
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
@rust-bors

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
@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 13, 2026
@rust-bors

rust-bors Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 76fd5fe failed: CI

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
rust-bors Bot merged commit 01635cf into rust-lang:main Nov 13, 2026
14 of 15 checks passed
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 13, 2026
@rustbot rustbot added this to the 1.102.0 milestone Nov 13, 2026
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
@lqd
lqd deleted the opt-dist-again branch November 13, 2026 16:24
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants