Skip to content

Rollup of 7 pull requests #139634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Apr 10, 2025
Merged

Rollup of 7 pull requests #139634

merged 29 commits into from
Apr 10, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

CraftSpider and others added 29 commits April 6, 2025 11:13
- consistent handling, invalid handles are always an abort
- Helper for reading handles that does the checking and machine stop
- Use real handle types more places
- Adds `File` and `Invalid` types of handle. File support will be added next
Support getting file metadata on Windows
triagebot: enable `[canonicalize-issue-links]` and `[no-mentions]`
It bugs me when variables of type `Ident` are called `name`. It leads to
silly things like `name.name`. `Ident` variables should be called
`ident`, and `name` should be used for variables of type `Symbol`.

This commit improves things by by doing `s/name/ident/` on a bunch of
`Ident` variables. Not all of them, but a decent chunk.
Note that some of the output is currently bogus, with missing params and
args:
```
fn add(: _, : _) -> _ { m::add(, ) }
```
The next commit will fix this.
Instead use `argN`. The empty identifiers could flow to
`Liveness::should_warn`, where they would trigger a bounds error.

Fixes rust-lang#139512.
Implement FreeBSD syscall _umtx_op  for futex support
The value is moved in pin!().
fix "still mutable" ice while metrics are enabled

Resolves "still mutable" ICE discovered by `@matthiaskrgr` here: [#t-docs-rs > metrics intitiative @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/356853-t-docs-rs/topic/metrics.20intitiative/near/510490790)

This was caused by invoking `crate_hash` before the `definitions` struct was frozen here: https://github.com/rust-lang/rust/blob/e643f59f6da3a84f43e75dea99afaa5b041ea6bf/compiler/rustc_interface/src/passes.rs#L951

resolved by moving metrics dumping to occur after `analysis` freezes the definitions

I'm guessing we didn't discover this in CI because the problem only occurs when you try to calculate the crash hash with incremental compilation enabled when it tries to freeze the definitions here: https://github.com/rust-lang/rust/blob/e643f59f6da3a84f43e75dea99afaa5b041ea6bf/compiler/rustc_middle/src/hir/map.rs#L1172

my understanding is that this causes us to freeze the definitions too early in compilation, then we subsequently try to mutate them, likely during `analysis`, and this causes the ICE.

r? `@bjorn3`
…dead

Rename some `name` variables as `ident`.

It bugs me when variables of type `Ident` are called `name`. It leads to silly things like `name.name`. `Ident` variables should be called `ident`, and `name` should be used for variables of type `Symbol`.

This commit improves things by by doing `s/name/ident/` on a bunch of `Ident` variables. Not all of them, but a decent chunk.

r? `@fee1-dead`
…r=compiler-errors

Update compiletest to Edition 2024

r? bootstrap (or compiler)

try-job: x86_64-apple-1
try-job: x86_64-msvc-1
try-jbo: x86_64-mingw-1
…Kobzol

compiletest: don't use stringly paths for `compose_and_run`

Eventually I'd like to fully migrate to `camino`'s `{Utf8Path,Utf8PathBuf}` because compiletest assumes UTF-8 paths all over the place, so this is an precursor change to make the migration diff cleaner.

r? `@Kobzol` (or bootstrap/compiler)
Avoid empty identifiers for delegate params and args.

Details in individual commits.

r? `@oli-obk`
Remove unnecessary `mut` in test.

The value is moved in `pin!()`, so the binding doesn't need to be `mut` itself.

(Rustc doesn't warn about this due to the current hacky implementation of `pin!()`. That is fixed by rust-lang#139114.)
Miri subtree update

r? `@ghost`

a sync is needed to fix the miri-test-libstd failures
@rustbot rustbot added the A-compiletest Area: The compiletest test runner label Apr 10, 2025
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Apr 10, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 10, 2025

📌 Commit c9613f8 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors 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 Apr 10, 2025
@bors
Copy link
Collaborator

bors commented Apr 10, 2025

⌛ Testing commit c9613f8 with merge 2205455...

@bors
Copy link
Collaborator

bors commented Apr 10, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 2205455 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 10, 2025
@bors bors merged commit 2205455 into rust-lang:master Apr 10, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 10, 2025
Copy link

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 69b3959 (parent) -> 2205455 (this PR)

Test differences

Show 57 test diffs

Stage 1

  • [pretty] tests/pretty/hir-delegation.rs: [missing] -> pass (J1)
  • [run-make] tests/run-make/unstable-feature-usage-metrics-incremental: [missing] -> pass (J1)

Stage 2

  • [pretty] tests/pretty/hir-delegation.rs: [missing] -> pass (J0)
  • [run-make] tests/run-make/unstable-feature-usage-metrics-incremental: [missing] -> ignore (ignored when the operating system is windows) (J2)
  • [run-make] tests/run-make/unstable-feature-usage-metrics-incremental: [missing] -> pass (J3)

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

Job group index

Job duration changes

  1. x86_64-apple-2: 5305.5s -> 7698.0s (45.1%)
  2. aarch64-apple: 4470.8s -> 3726.9s (-16.6%)
  3. dist-x86_64-apple: 7883.7s -> 8790.2s (11.5%)
  4. x86_64-apple-1: 10415.4s -> 9359.0s (-10.1%)
  5. dist-x86_64-linux: 4977.4s -> 5447.5s (9.4%)
  6. dist-apple-various: 6552.7s -> 7107.8s (8.5%)
  7. dist-aarch64-apple: 5093.6s -> 4710.8s (-7.5%)
  8. x86_64-gnu-llvm-19-3: 6795.8s -> 7215.9s (6.2%)
  9. dist-powerpc-linux: 5420.4s -> 5754.1s (6.2%)
  10. x86_64-mingw-1: 9150.6s -> 8682.5s (-5.1%)
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
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#139502 fix "still mutable" ice while metrics are enabled d0c9596cbe7680e0eadc611ccde883d0a28ad909 (link)
#139510 Rename some name variables as ident. 65564c54ded4a172c63f2c2892eb72d73fe699df (link)
#139606 Update compiletest to Edition 2024 3d038d7eb698dd3cb7af355085d29493ce1d3cd6 (link)
#139609 compiletest: don't use stringly paths for compose_and_run 8eea56978c0f05610ac5293522490cb679ec5559 (link)
#139614 Avoid empty identifiers for delegate params and args. 29130ce264fa1917bc34e8265a5bbc5f56291b15 (link)
#139626 Remove unnecessary mut in test. f882c57171d2fb160436ec4fe5cc6289c0bb70b9 (link)
#139630 Miri subtree update c84749b643db71365610cdebedf009b202b61a8a (link)

previous master: 69b3959afe

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2205455): comparison URL.

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

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.2% [0.2%, 0.3%] 4
Regressions ❌
(secondary)
0.3% [0.2%, 0.6%] 23
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 1
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.5%] 1
All ❌✅ (primary) 0.2% [-0.2%, 0.3%] 5

Max RSS (memory usage)

Results (primary -1.4%, secondary -3.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.7% [2.7%, 2.7%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-5.6% [-5.6%, -5.6%] 1
Improvements ✅
(secondary)
-3.0% [-3.6%, -2.7%] 3
All ❌✅ (primary) -1.4% [-5.6%, 2.7%] 2

Cycles

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

Binary size

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

Bootstrap: 782.988s -> 783.243s (0.03%)
Artifact size: 366.24 MiB -> 366.21 MiB (-0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Apr 10, 2025
@Mark-Simulacrum Mark-Simulacrum removed the perf-regression Performance regression. label Apr 14, 2025
@Mark-Simulacrum
Copy link
Member

Looks to be just bimodality, not a real regression.

@matthiaskrgr matthiaskrgr requested a review from Copilot April 14, 2025 18:15
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 93 out of 94 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • compiler/rustc_hir_analysis/messages.ftl: Language not supported
Comments suppressed due to low confidence (2)

compiler/rustc_data_structures/src/sync/freeze.rs:91

  • [nitpick] Ensure that the updated error message aligns with the project's overall messaging style and concisely conveys the issue.
self.try_write().expect("data should not be frozen if we're still attempting to mutate it")

compiler/rustc_driver_impl/src/lib.rs:369

  • Verify that moving the dump_feature_usage_metrics call after analysis does not affect the timing or side effects expected by downstream components.
if let Some(metrics_dir) = &sess.opts.unstable_opts.metrics_dir {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.