Skip to content
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

Rollup of 20 pull requests #138058

Merged
merged 76 commits into from
Mar 5, 2025
Merged

Rollup of 20 pull requests #138058

merged 76 commits into from
Mar 5, 2025

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Mar 5, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jyn514 and others added 30 commits February 13, 2025 10:24
`py` is not installed by default *and* trying to run it results in a
popup asking if you want to install it. `python3` is installed by
default.

This hopefully should not be too disruptive to people on Windows, since
they should be going through `x.ps1` instead anyway. Just in case, I've
added a check for Cygwin and Msys (i'm not sure how else you'd get a
bash shell on windows).
To make the error cases easier to spot on a quick glance.
In Rust 1.81, we added a FCW lint (including linting in dependencies)
against pointer casts that add an auto trait to dyn bounds.  This was
part of work making casts of pointers involving trait objects stricter
which was needed to restabilize trait upcasting.

We considered just making this a hard error at the time, but opted
against it due to breakage found by crater.  This breakage was mostly
due to the `anymap` crate which has been a persistent problem for us.

It's now a year later, and the fact that this is not yet a hard error
is giving us pause about stabilizing arbitrary self types and
`derive(CoercePointee)`.  So let's now make a hard error of this.
illumos has `posix_spawn`, and the very newest versions also have `_addchdir`,
so use that.

This is a nice ~4x performance improvement for process creation. My go-to as
usual is nextest against the clap repo, which acts as a stress test for process
creation -- with [this commit]:

```console
$ cargo nextest run -E 'not test(ui_tests) and not test(example_tests)'
before: Summary [   1.747s] 879 tests run: 879 passed, 2 skipped
after:  Summary [   0.445s] 879 tests run: 879 passed, 2 skipped
```

[this commit]: clap-rs/clap@fde45f9
This overrides the test=false flag in Cargo.toml and it shouldn't be
necessary as --tests is already passed.
It is reasonable to expect that ./x.py test core is enough to run tests
when you are working on core. In addition it seems like CI for wasm32 at
least doesn't run coretests currently, which this commit fixes.
When both width and precision flags are specified, then the character
width is counted twice. Instead, record the character width when
truncating it to the precision, so it does not need to be recomputed.
Simplify control flow so the cases are more clear.
- Some UEFI protocols such as TCP4, TCP6, UDP4, UDP6, etc are managed by
  service binding protocol.
- A new instance of such protocols is created and destroyed using the
  corresponding service binding protocol.
- This PR adds abstractions to make using such protocols simpler using
  Rust Drop trait.
- The reason to add these abstractions in a seperate PR from TCP4
  Protocol is to make review easier.

[EFI_SERVICE_BINDING_PROTCOL](https://uefi.org/specs/UEFI/2.11/11_Protocols_UEFI_Driver_Model.html#efi-service-binding-protocol)

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
It has served us well, but it's time to retire the `Makefile` support
file since this is no longer needed.
And remove outdated requirements to run `run-make` tests on Windows.
These constants can be useful outside of their current module. Make them
`pub(crate)` to allow for this.
Fix or elaborate existing float parsing documentation. This includes
introducing a convention that should make naming more consistent.
This module currently contains two decimal types, `Decimal` and
`Number`. These names don't provide a whole lot of insight into what
exactly they are, and `Number` is actually the one that is more like an
expected `Decimal` type.

In accordance with this, rename the existing `Decimal` to `DecimalSeq`.
This highlights that it contains a sequence of decimal digits, rather
than representing a base-10 floating point (decimal) number.

Additionally, add some tests to validate internal behavior.
The previous commit renamed `Decimal` to `DecimalSeq`. Now, rename the
type that represents a decimal floating point number to be `Decimal`.

Additionally, add some tests for internal behavior.
A lot of the magic constants can be turned into expressions. This
reduces some code duplication.

Additionally, add traits to make these operations fully generic. This
will make it easier to support `f16` and `f128`.
This is just a bit of code cleanup to make use of returning early.
This is to make test stderr insensitive to compare-mode / debugger that
changes the test build dir output name.

Previously, this normalized paths up to test-suite-specific build root,
e.g. `/path/to/build/test/ui/`. Now, this normalizes up to test-specific
build root, e.g.
`/path/to/build/test/ui/subdir/$name.$revision.$mode.$debugger/`.
@rustbot rustbot added this to the 1.87.0 milestone Mar 5, 2025
@jieyouxu jieyouxu deleted the rollup-skdt0oz branch March 5, 2025 18:30
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#134063 dec2flt: Clean up float parsing modules 407d6251652398bbda4a1cf85bbcb4a7bcf7ca92 (link)
#136581 Retire the legacy Makefile-based run-make test infra fbb6e2709fa4768b4f2d70238ba6e2ef564d90af (link)
#136662 Count char width at most once in Formatter::pad cb2f04e84bceeea4a8d21f790391e1c6b90a6c7a (link)
#136764 Make ptr_cast_add_auto_to_object lint into hard error 69a438bc2808caed5c04eb054970b0c411fbacd8 (link)
#136798 Added documentation for flushing per #74348 758c50d2142774e7e528b12a8c49c03d9c5a5b1c (link)
#136865 Perform deeper compiletest path normalization for `$TEST_BU… e57dbe76a6870bcb06f0987764063fdde8764910 (link)
#136975 Look for python3 first on MacOS, not py 4ebb19f39fc2c1af08cec9b8078032d2a1ed82eb (link)
#136977 Upload Datadog metrics with citool 10603611efcaa579dd7622c5b46aeebd56906c56 (link)
#137240 Slightly reformat std::fs::remove_dir_all error docs b016dc07e5feb92a0efaf5381206378db1bf764e (link)
#137298 Check signature WF when lowering MIR body 3dbd08cceb34c40415a207a6073671be005a62a7 (link)
#137463 [illumos] attempt to use posix_spawn to spawn processes 69b725abe3c4f0ac0b2ad4ad394cac820eaeade4 (link)
#137477 uefi: Add Service Binding Protocol abstraction d396116e97edd079767c1d8405907652de4b767e (link)
#137569 Stabilize string_extend_from_within 56f7297470a4206b7121c17fd350e6d4c101e249 (link)
#137633 Only use implied bounds hack if bevy, and use deeply normal… eca7840b2f5ac3027693fe93f29f3a7cefd0ad63 (link)
#137679 Various coretests improvements fc8e6b9558bc1de5e725931169eba44e7ffda2a1 (link)
#137723 Make rust.description more general-purpose and pass `CFG_… eaed7433aec50ecc7b9b799416eab679bccad42e (link)
#137728 Remove unsizing coercions for tuples 86e5c3c41393650b1fff6d6fafc0db13f23a8d84 (link)
#137731 Resume one waiter at once in deadlock handler 7273ee4d524e45ba9127c00d5617e187df3d219c (link)
#137875 mir_build: Integrate "simplification" steps into match-pair… 194619d68076c03b541822de1ef354168552149c (link)
#138028 compiler: add ExternAbi::is_rustic_abi 7fbfadb74809959b9b390efd585c5e7dab61962d (link)

previous master: 4559163ccb

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 (07b5eee): 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.6% [0.2%, 1.6%] 29
Regressions ❌
(secondary)
0.4% [0.1%, 1.0%] 16
Improvements ✅
(primary)
-1.7% [-13.7%, -0.1%] 11
Improvements ✅
(secondary)
-7.8% [-38.3%, -0.3%] 10
All ❌✅ (primary) -0.0% [-13.7%, 1.6%] 40

Max RSS (memory usage)

Results (primary -0.5%, secondary -1.1%)

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)
3.8% [1.1%, 5.3%] 4
Regressions ❌
(secondary)
2.2% [0.9%, 3.5%] 9
Improvements ✅
(primary)
-2.9% [-5.1%, -1.1%] 7
Improvements ✅
(secondary)
-2.8% [-15.8%, -0.8%] 18
All ❌✅ (primary) -0.5% [-5.1%, 5.3%] 11

Cycles

Results (primary 0.7%, secondary -13.6%)

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.0% [0.9%, 3.4%] 13
Regressions ❌
(secondary)
3.9% [3.9%, 3.9%] 1
Improvements ✅
(primary)
-7.8% [-13.3%, -2.4%] 2
Improvements ✅
(secondary)
-17.9% [-37.0%, -1.5%] 4
All ❌✅ (primary) 0.7% [-13.3%, 3.4%] 15

Binary size

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

Bootstrap: 777.245s -> 775.73s (-0.19%)
Artifact size: 362.11 MiB -> 362.10 MiB (-0.00%)

@rustbot rustbot added the perf-regression Performance regression. label Mar 5, 2025
@jieyouxu
Copy link
Member Author

jieyouxu commented Mar 5, 2025

@rust-timer build cb2f04e

@rust-timer

This comment has been minimized.

@jieyouxu

This comment was marked as outdated.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (cb2f04e): comparison URL.

Overall result: ✅ improvements - no action needed

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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.1%, -0.1%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.1% [-0.1%, -0.1%] 2

Max RSS (memory usage)

Results (primary -1.9%, secondary 2.1%)

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)
- - 0
Regressions ❌
(secondary)
2.1% [0.6%, 3.3%] 3
Improvements ✅
(primary)
-1.9% [-1.9%, -1.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.9% [-1.9%, -1.9%] 1

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: 777.245s -> 776.97s (-0.04%)
Artifact size: 362.11 MiB -> 362.09 MiB (-0.01%)

@jieyouxu
Copy link
Member Author

jieyouxu commented Mar 5, 2025

@rust-timer build 3dbd08c

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3dbd08c): comparison URL.

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

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.3% [0.3%, 0.3%] 4
Regressions ❌
(secondary)
0.4% [0.1%, 1.0%] 15
Improvements ✅
(primary)
-2.3% [-13.6%, -0.2%] 8
Improvements ✅
(secondary)
-14.6% [-38.2%, -0.2%] 5
All ❌✅ (primary) -1.4% [-13.6%, 0.3%] 12

Max RSS (memory usage)

Results (primary -0.1%, secondary -2.2%)

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)
3.3% [0.8%, 4.6%] 5
Regressions ❌
(secondary)
1.3% [0.8%, 1.7%] 5
Improvements ✅
(primary)
-2.9% [-5.2%, -1.0%] 6
Improvements ✅
(secondary)
-11.0% [-15.1%, -6.9%] 2
All ❌✅ (primary) -0.1% [-5.2%, 4.6%] 11

Cycles

Results (primary 0.6%, secondary -23.1%)

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)
3.1% [2.3%, 3.6%] 7
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-7.8% [-13.2%, -2.5%] 2
Improvements ✅
(secondary)
-23.1% [-36.5%, -3.8%] 3
All ❌✅ (primary) 0.6% [-13.2%, 3.6%] 9

Binary size

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

Bootstrap: 777.245s -> 777.621s (0.05%)
Artifact size: 362.11 MiB -> 362.17 MiB (0.02%)

@Zalathar
Copy link
Contributor

Zalathar commented Mar 6, 2025

@rust-timer build 194619d

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (194619d): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

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
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
-0.2% [-0.3%, -0.2%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-0.3%, -0.2%] 2

Max RSS (memory usage)

Results (primary -1.7%, secondary -2.3%)

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)
1.0% [0.9%, 1.1%] 2
Regressions ❌
(secondary)
2.4% [2.0%, 2.7%] 3
Improvements ✅
(primary)
-2.0% [-4.7%, -0.6%] 20
Improvements ✅
(secondary)
-2.4% [-5.2%, -0.7%] 98
All ❌✅ (primary) -1.7% [-4.7%, 1.1%] 22

Cycles

Results (secondary 1.3%)

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)
- - 0
Regressions ❌
(secondary)
2.4% [2.2%, 2.6%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 777.245s -> 777.745s (0.06%)
Artifact size: 362.11 MiB -> 362.17 MiB (0.02%)

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-meta Area: Issues & PRs about the rust-lang/rust repository itself A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. O-unix Operating system: Unix-like perf-regression Performance regression. 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-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.