Add `#[inline]` to `Layout::is_size_align_valid`
Fixes rust-lang/rust#149687
r? @saethlin
@bors r+ roll-up=iffy (may perturb perf)
:pushpin: Commit ae3536e5891dff8d2111ca55d20e3815c2046e9c has been approved by saethlin
It is now in the queue for this repository.
@bors rollup=iffy
Yeah I'm on a phone. We really are struggling here aren't we.
The job x86_64-gnu-gcc failed! Check out the build log: (web) (plain enhanced) (plain)
Click to see the possible cause of the failure (guessed by this bot)
test [codegen-units] tests/codegen-units/item-collection/non-generic-closures.rs ... ok
test [codegen-units] tests/codegen-units/item-collection/static-init.rs ... ok
test [codegen-units] tests/codegen-units/item-collection/statics-and-consts.rs ... ok
test [codegen-units] tests/codegen-units/item-collection/overloaded-operators.rs ... ok
FATAL: !(missing.is_empty() && unexpected.is_empty() && wrong_cgus.is_empty())
test [codegen-units] tests/codegen-units/item-collection/opaque-return-impls.rs ... FAILED
test [codegen-units] tests/codegen-units/item-collection/trait-implementations.rs ... ok
test [codegen-units] tests/codegen-units/item-collection/trait-method-default-impl.rs ... ok
test [codegen-units] tests/codegen-units/item-collection/trait-method-as-argument.rs ... ok
test [codegen-units] tests/codegen-units/item-collection/transitive-drop-glue.rs ... ok
---
---- [codegen-units] tests/codegen-units/item-collection/opaque-return-impls.rs stdout ----
These items were contained but should not have been:
MONO_ITEM fn std::ptr::Alignment::new_unchecked::precondition_check @@ opaque_return_impls.a116a005f37f8ef5-cgu.0[Internal]
thread '[codegen-units] tests/codegen-units/item-collection/opaque-return-impls.rs' panicked at src/tools/compiletest/src/runtest/codegen_units.rs:111:13:
fatal error
For more information how to resolve CI failures of this job, visit this link.
@bors r-
@bors try @rust-timer queue
(since we're waiting anyway..)
Awaiting bors try build completion.
@rustbot label: +S-waiting-on-perf
:hourglass: Trying commit ae3536e5891dff8d2111ca55d20e3815c2046e9c with merge d86c359e479b8a350b9a5dd09229e69fe6502004…
To cancel the try build, run the command @bors try cancel.
Workflow: https://github.com/rust-lang/rust/actions/runs/19974608749
The job tidy failed! Check out the build log: (web) (plain enhanced) (plain)
Click to see the possible cause of the failure (guessed by this bot)
[TIMING:end] tool::ToolBuild { build_compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu, forced_compiler: false }, target: x86_64-unknown-linux-gnu, tool: "tidy", path: "src/tools/tidy", mode: ToolBootstrap, source_type: InTree, extra_features: [], allow_features: "", cargo_args: [], artifact_kind: Binary } -- 12.253
[TIMING:end] tool::Tidy { compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu, forced_compiler: false }, target: x86_64-unknown-linux-gnu } -- 0.000
fmt check
Diff in /checkout/tests/codegen-units/item-collection/opaque-return-impls.rs:47:
//~ MONO_ITEM fn std::alloc::Global::alloc_impl
//~ MONO_ITEM fn std::boxed::Box::<TestStruct2>::new
//~ MONO_ITEM fn std::alloc::Layout::from_size_align_unchecked::precondition_check
-//~ MONO_ITEM fn std::ptr::Alignment::new_unchecked::precondition_check
+//~ MONO_ITEM fn std::ptr::Alignment::new_unchecked::precondition_check
//~ MONO_ITEM fn std::ptr::NonNull::<T>::new_unchecked::precondition_check
struct Counter {
fmt: checked 6589 files
Bootstrap failed while executing `test src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck`
Build completed unsuccessfully in 0:00:51
since we're waiting anyway
Hunh?
Oh. The CI failure is hidden. Ugh
:sunny: Try build successful (CI)
Build commit: d86c359e479b8a350b9a5dd09229e69fe6502004 (d86c359e479b8a350b9a5dd09229e69fe6502004, parent: 66428d92bec337ed4785d695d0127276a482278c)
Queued d86c359e479b8a350b9a5dd09229e69fe6502004 with parent 66428d92bec337ed4785d695d0127276a482278c, future comparison URL. There is currently 1 preceding artifact in the queue. It will probably take at least ~2.4 hours until the benchmark run finishes.
Finished benchmarking commit (d86c359e479b8a350b9a5dd09229e69fe6502004): comparison URL.
Overall result: ❌ regressions - 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.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
1.2% | [0.1%, 4.3%] | 4 |
| Regressions ❌ (secondary) |
1.3% | [0.2%, 2.2%] | 6 |
| Improvements ✅ (primary) |
- | - | 0 |
| Improvements ✅ (secondary) |
- | - | 0 |
| All ❌✅ (primary) | 1.2% | [0.1%, 4.3%] | 4 |
Max RSS (memory usage)
Results (primary -0.4%, secondary 0.8%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
2.2% | [1.7%, 2.8%] | 3 |
| Regressions ❌ (secondary) |
5.2% | [5.2%, 5.2%] | 1 |
| Improvements ✅ (primary) |
-3.0% | [-4.3%, -1.5%] | 3 |
| Improvements ✅ (secondary) |
-3.6% | [-3.6%, -3.6%] | 1 |
| All ❌✅ (primary) | -0.4% | [-4.3%, 2.8%] | 6 |
Cycles
Results (primary 5.9%, secondary 0.2%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
5.9% | [5.9%, 5.9%] | 1 |
| Regressions ❌ (secondary) |
3.3% | [2.8%, 3.8%] | 2 |
| Improvements ✅ (primary) |
- | - | 0 |
| Improvements ✅ (secondary) |
-3.0% | [-3.3%, -2.6%] | 2 |
| All ❌✅ (primary) | 5.9% | [5.9%, 5.9%] | 1 |
Binary size
Results (primary 0.0%, secondary 1.0%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
0.1% | [0.0%, 0.2%] | 16 |
| Regressions ❌ (secondary) |
1.0% | [0.1%, 2.6%] | 21 |
| Improvements ✅ (primary) |
-0.3% | [-0.7%, -0.1%] | 5 |
| Improvements ✅ (secondary) |
- | - | 0 |
| All ❌✅ (primary) | 0.0% | [-0.7%, 0.2%] | 21 |
Bootstrap: 470.249s -> 473.304s (0.65%) Artifact size: 386.85 MiB -> 386.93 MiB (0.02%)
eza's patch now dirties 32 CGUs instead of 16, and the microbenchmarks have an extra CGU. Regressions are as expected, the dubious CGU partitioning is a predictable outcome of compiling an incremental build with some optimized dependencies.
Squash the commits then r=me.
@bors r=@joboet
@RustyYato: :key: Insufficient privileges: Not in reviewers
@bors r+
:pushpin: Commit 5f9aca7e74ca901cd6e3fad6dbc6a5a14f160ea1 has been approved by saethlin
It is now in the queue for this repository.
:hourglass: Testing commit 5f9aca7e74ca901cd6e3fad6dbc6a5a14f160ea1 with merge 1d6c526bb010900bc1fd4c45c4ef0307b5150583...
:sunny: Test successful - checks-actions Approved by: saethlin Pushing 1d6c526bb010900bc1fd4c45c4ef0307b5150583 to main...
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 aa301763000fd65db235b2d6e4c04da99abf8cd8 (parent) -> 1d6c526bb010900bc1fd4c45c4ef0307b5150583 (this PR)
Test differences
Show 12 test diffs
12 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 1d6c526bb010900bc1fd4c45c4ef0307b5150583 --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
- pr-check-2: 2560.3s -> 2156.0s (-15.8%)
- aarch64-gnu-debug: 4534.6s -> 3886.9s (-14.3%)
- pr-check-1: 1967.6s -> 1715.0s (-12.8%)
- dist-x86_64-apple: 6690.3s -> 7541.4s (+12.7%)
- dist-aarch64-llvm-mingw: 5621.7s -> 6335.0s (+12.7%)
- i686-gnu-2: 6028.3s -> 5270.3s (-12.6%)
- dist-apple-various: 4194.0s -> 3671.0s (-12.5%)
- x86_64-gnu-gcc: 3528.4s -> 3104.4s (-12.0%)
- x86_64-rust-for-linux: 3051.4s -> 2685.2s (-12.0%)
- x86_64-gnu-llvm-21-1: 3579.7s -> 3155.1s (-11.9%)
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.
Finished benchmarking commit (1d6c526bb010900bc1fd4c45c4ef0307b5150583): comparison URL.
Overall result: ❌ regressions - 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-triagedto 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-performanceworking 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
Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
1.2% | [0.1%, 4.3%] | 4 |
| Regressions ❌ (secondary) |
1.0% | [0.2%, 2.2%] | 8 |
| Improvements ✅ (primary) |
- | - | 0 |
| Improvements ✅ (secondary) |
- | - | 0 |
| All ❌✅ (primary) | 1.2% | [0.1%, 4.3%] | 4 |
Max RSS (memory usage)
Results (primary -0.9%, secondary -2.8%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
2.4% | [1.8%, 3.4%] | 4 |
| Regressions ❌ (secondary) |
- | - | 0 |
| Improvements ✅ (primary) |
-3.5% | [-4.8%, -1.6%] | 5 |
| Improvements ✅ (secondary) |
-2.8% | [-2.8%, -2.8%] | 1 |
| All ❌✅ (primary) | -0.9% | [-4.8%, 3.4%] | 9 |
Cycles
Results (primary 1.1%, secondary 1.9%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
4.7% | [4.7%, 4.7%] | 1 |
| Regressions ❌ (secondary) |
1.9% | [1.2%, 2.5%] | 2 |
| Improvements ✅ (primary) |
-2.4% | [-2.4%, -2.4%] | 1 |
| Improvements ✅ (secondary) |
- | - | 0 |
| All ❌✅ (primary) | 1.1% | [-2.4%, 4.7%] | 2 |
Binary size
Results (primary -0.0%, secondary 1.0%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
0.1% | [0.0%, 0.2%] | 16 |
| Regressions ❌ (secondary) |
1.0% | [0.1%, 2.6%] | 21 |
| Improvements ✅ (primary) |
-0.1% | [-0.7%, -0.0%] | 16 |
| Improvements ✅ (secondary) |
- | - | 0 |
| All ❌✅ (primary) | -0.0% | [-0.7%, 0.2%] | 32 |
Bootstrap: 472.025s -> 470.852s (-0.25%) Artifact size: 388.84 MiB -> 388.93 MiB (0.02%)
perf triage:
Little regression matches pre-merge run, justified by https://github.com/rust-lang/rust/pull/149690#issuecomment-3620152210
@rustbot label: +perf-regression-triaged