Skip to content

resolve: Avoid finalizing extern prelude entries more than once - #144737

Merged
bors merged 1 commit into
rust-lang:masterfrom
petrochenkov:extprelcache
Sep 5, 2025
Merged

resolve: Avoid finalizing extern prelude entries more than once#144737
bors merged 1 commit into
rust-lang:masterfrom
petrochenkov:extprelcache

Conversation

@petrochenkov

@petrochenkovpetrochenkov commented Jul 31, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@rustbot

Copy link
Copy Markdown
Collaborator

r? @fee1-dead

rustbot has assigned @fee1-dead.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 31, 2025
@petrochenkov

Copy link
Copy Markdown
ContributorAuthor

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-borsBot added a commit that referenced this pull request Jul 31, 2025
[WIP] resolve: Better caching for unsuccessful crate resolutions
@rust-bors

rust-borsBot commented Jul 31, 2025

Copy link
Copy Markdown
Contributor

⌛ Trying commit 3d03332 with merge f9cf5ef

To cancel the try build, run the command @bors try cancel.

@rustbotrustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 31, 2025
@petrochenkovpetrochenkov removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 31, 2025
@rust-bors

rust-borsBot commented Jul 31, 2025

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: f9cf5ef (f9cf5ef36ff11c909b0400242dad9298aee6de82, parent: 64ca23b6235732fa61c0a2b957c5d7e591e7c972)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (f9cf5ef): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary 1.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
4.1%[3.7%, 4.4%]2
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-2.5%[-2.5%, -2.5%]1
All ❌✅ (primary)--0

Cycles

Results (secondary 4.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
7.3%[3.6%, 10.9%]2
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-2.2%[-2.2%, -2.2%]1
All ❌✅ (primary)--0

Binary size

Results (secondary 0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
0.0%[0.0%, 0.0%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)--0

Bootstrap: 467.836s -> 469.081s (0.27%)
Artifact size: 376.81 MiB -> 376.82 MiB (0.00%)

@rustbotrustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 31, 2025
@petrochenkov

Copy link
Copy Markdown
ContributorAuthor

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

rust-borsBot commented Jul 31, 2025

Copy link
Copy Markdown
Contributor

⌛ Trying commit 8f0d729 with merge b757ae7

To cancel the try build, run the command @bors try cancel.

rust-borsBot added a commit that referenced this pull request Jul 31, 2025
[WIP] resolve: Better caching for unsuccessful crate resolutions
@rustbotrustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 31, 2025
@rust-bors

rust-borsBot commented Jul 31, 2025

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: b757ae7 (b757ae7fff3f4bb8eafd4f24581e2cb971601fd7, parent: 3fb1b53a9dbfcdf37a4b67d35cde373316829930)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (b757ae7): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-1.1%[-2.0%, -0.4%]8
All ❌✅ (primary)--0

Max RSS (memory usage)

Results (secondary 3.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
3.6%[3.6%, 3.6%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)--0

Cycles

Results (secondary -0.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
8.0%[8.0%, 8.0%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-3.0%[-3.3%, -2.7%]3
All ❌✅ (primary)--0

Binary size

Results (secondary 0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
0.0%[0.0%, 0.0%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)--0

Bootstrap: 467.851s -> 468.346s (0.11%)
Artifact size: 376.84 MiB -> 376.80 MiB (-0.01%)

@rustbotrustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 31, 2025
@petrochenkov

petrochenkov commented Jul 31, 2025

Copy link
Copy Markdown
ContributorAuthor

I'll rebase this after #146004 is merged.
@rustbot blocked

@rustbotrustbot added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Jul 31, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 4, 2025
resolve: Cleanups and micro-optimizations to extern prelude
This is what can be done without changing the structure of `ExternPreludeEntry`, like in rust-lang#144737.
See individual commits for details.
rust-timer added a commit that referenced this pull request Aug 4, 2025
Rollup merge of #144746 - petrochenkov:extpreltidy, r=b-naber
resolve: Cleanups and micro-optimizations to extern prelude
This is what can be done without changing the structure of `ExternPreludeEntry`, like in #144737.
See individual commits for details.
github-actionsBot pushed a commit to rust-lang/miri that referenced this pull request Aug 4, 2025
resolve: Cleanups and micro-optimizations to extern prelude
This is what can be done without changing the structure of `ExternPreludeEntry`, like in rust-lang/rust#144737.
See individual commits for details.
@petrochenkovpetrochenkov removed the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Aug 14, 2025
rust-borsBot added a commit that referenced this pull request Sep 2, 2025
resolve: Avoid finalizing extern prelude entries more than once
@rust-bors

This comment has been minimized.

@petrochenkovpetrochenkov removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 2, 2025
@rust-bors

rust-borsBot commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 5c18da3 (5c18da3dd7b32e5f8cabc1dc00f8fc55777c447f, parent: f6df223ea8c0017e64ce19c99afa32c0c629142c)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (5c18da3): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
0.1%[0.1%, 0.1%]1
Improvements ✅
(primary)
-0.1%[-0.1%, -0.1%]4
Improvements ✅
(secondary)
-1.5%[-3.1%, -0.0%]9
All ❌✅ (primary)-0.1%[-0.1%, -0.1%]4

Max RSS (memory usage)

Results (primary -1.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-1.6%[-1.6%, -1.6%]1
Improvements ✅
(secondary)
--0
All ❌✅ (primary)-1.6%[-1.6%, -1.6%]1

Cycles

Results (secondary -1.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
2.8%[2.8%, 2.8%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-2.4%[-2.9%, -2.1%]3
All ❌✅ (primary)--0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 467.107s -> 467.044s (-0.01%)
Artifact size: 388.34 MiB -> 388.41 MiB (0.02%)

@rustbotrustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 2, 2025
@petrochenkov

Copy link
Copy Markdown
ContributorAuthor

@rustbot ready

@rustbotrustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 2, 2025
@fee1-dead

Copy link
Copy Markdown
Member

r? compiler

@rustbotrustbot assigned davidtwco and unassigned fee1-deadSep 3, 2025
@davidtwco

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Sep 4, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit 235dfba has been approved by davidtwco

It is now in the queue for this repository.

@borsbors 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 Sep 4, 2025
@bors

bors commented Sep 5, 2025

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 235dfba with merge ad85bc5...

@bors

bors commented Sep 5, 2025

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: davidtwco
Pushing ad85bc5 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Sep 5, 2025
@bors
bors merged commit ad85bc5 into rust-lang:masterSep 5, 2025
12 checks passed
@rustbotrustbot added this to the 1.91.0 milestone Sep 5, 2025
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 91edc3e (parent) -> ad85bc5 (this PR)

Test differences

Show 4 test diffs

4 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard ad85bc524b1ad696e42061ad8338d382dffbdbe5 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-llvm-19: 2925.3s -> 2422.9s (-17.2%)
  2. pr-check-1: 1705.4s -> 1430.8s (-16.1%)
  3. x86_64-rust-for-linux: 2967.3s -> 2562.1s (-13.7%)
  4. aarch64-apple: 4853.3s -> 5392.7s (11.1%)
  5. i686-gnu-1: 8062.4s -> 7276.5s (-9.7%)
  6. i686-gnu-2: 6080.3s -> 5489.5s (-9.7%)
  7. aarch64-gnu-llvm-19-2: 2552.3s -> 2312.4s (-9.4%)
  8. dist-aarch64-msvc: 6039.6s -> 5494.0s (-9.0%)
  9. i686-gnu-nopt-1: 8181.8s -> 7474.5s (-8.6%)
  10. x86_64-gnu-aux: 6900.2s -> 6331.8s (-8.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (ad85bc5): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-0.1%[-0.1%, -0.1%]6
Improvements ✅
(secondary)
-1.1%[-2.0%, -0.4%]8
All ❌✅ (primary)-0.1%[-0.1%, -0.1%]6

Max RSS (memory usage)

Results (primary 0.5%, secondary 2.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
0.5%[0.5%, 0.5%]1
Regressions ❌
(secondary)
3.5%[2.4%, 4.5%]4
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-2.3%[-2.3%, -2.3%]1
All ❌✅ (primary)0.5%[0.5%, 0.5%]1

Cycles

Results (secondary -2.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-2.5%[-3.2%, -2.0%]3
All ❌✅ (primary)--0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 468.177s -> 467.829s (-0.07%)
Artifact size: 390.48 MiB -> 390.58 MiB (0.03%)

@rustbotrustbot removed the perf-regression Performance regression. label Sep 5, 2025
makai410 pushed a commit to makai410/rust that referenced this pull request Nov 8, 2025
resolve: Avoid finalizing extern prelude entries more than once
makai410 pushed a commit to makai410/rust that referenced this pull request Nov 10, 2025
resolve: Avoid finalizing extern prelude entries more than once
Kobzol pushed a commit to Kobzol/rustc_codegen_cranelift that referenced this pull request Dec 29, 2025
resolve: Refactor `struct ExternPreludeEntry`
Avoid impossible combinations of fields and apply the first part of rust-lang/rust#144737 (do not resolve erroneous entries repeatedly, keep them as `PendingBinding::Ready(None)` instead).
@petrochenkov
petrochenkov deleted the extprelcache branch June 17, 2026 14:55
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@petrochenkov@rustbot@rust-timer@fee1-dead@davidtwco@bors