Skip to content

Conversation

@matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Dec 9, 2025

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Skgland and others added 21 commits November 26, 2025 22:44
Build outline atomic symbols on all targets that have `outline-atomics`
enabled, rather than only on Linux. Since this is no longer OS-specific,
also rename the module.
Change the gating and link sections to enable this for any platforms
that enable `outline-atomics`, rather than only Linux. Additionally, no
longer run this if LSE is available, since in this case the outline
versions will never be called.
Windows has a similar flag `/forceInterlockedFunctions`, which uses
names such as `_InterlockedAdd64_rel`.
Per LLVM commit c5e7e64 ("[AArch64][Clang][Linux] Enable
out-of-line atomics by default.") [1], Clang enables these on Android.
Thus, do the same in Rust.

[1]: llvm/llvm-project@c5e7e649d537067de
Clang has done this by default since LLVM commit 1a963d3 ("[Driver]
Make -moutline-atomics default for aarch64-fuchsia targets"), [1], so do
the same here.

[1]: llvm/llvm-project@1a963d3
Clang has recently started doing this, as of LLVM commit 5d774ec8d183
("[Driver] Enable outline atomics for OpenBSD/aarch64") [1]. Thus, do
the same here.

[1]: llvm/llvm-project@5d774ec
```
error: expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found macro `concat`
  --> $DIR/macro-in-attribute.rs:4:21
   |
LL | #[deprecated(note = concat!("a", "b"))]
   |                     ^^^^^^^^^^^^^^^^^ macros are not allowed here
```
…avidtwco

Enable `outline-atomics` by default on more AArch64 platforms

The baseline Armv8.0 ISA doesn't have atomics instructions, but in
practice most hardware is at least Armv8.1-A (2014), which includes
single-instruction atomics as part of the LSE feature. As a performance
optimization for these cases, GCC and LLVM have the `-moutline-atomics` flag
to turn atomic operations into calls to symbols like `__aarch64_cas1_acq`.
These can do runtime feature detection and use the LSE instructions if
available, falling back to more portable load-exclusive/store-exclusive
loops.

Since the recent 3b50253 ("compiler-builtins: plumb LSE support
for aarch64 on linux") our builtins support this LSE optimization, and
since 6936bb9 ("Dynamically enable LSE for aarch64 rust provided
intrinsics"), std will set the flag as part of its startup code. The first
commit in this PR configures this to work on all platforms built with
`outline-atomics`, not just Linux.

Thus, enable `outline-atomics` by default on Android, OpenBSD, Windows,
and Fuchsia platforms that don't have LSE in the baseline. The feature is
already enabled on Linux. Platform-specific details are included in each
commit message.

The current implementation can still be accessed by setting
`-Ctarget-feature=-outline-atomics`. Setting `-Ctarget-feature=+lse` or
a relevant CPU will use the single-instruction atomics without the call
overhead. https://rust.godbolt.org/z/dsdrzszoe

Link: https://learn.arm.com/learning-paths/servers-and-cloud-computing/lse/intro/
Original Clang outline-atomics benchmarks: https://reviews.llvm.org/D91157#2435844

try-job: aarch64-msvc-*
try-job: arm-android
try-job: dist-android
try-job: dist-aarch64-llvm-mingw
try-job: dist-aarch64-msvc
try-job: dist-various-*
try-job: test-various
Handle macro invocation in attribute during parse

```
error: expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found macro `concat`
  --> $DIR/macro-in-attribute.rs:4:21
   |
LL | #[deprecated(note = concat!("a", "b"))]
   |                     ^^^^^^^^^^^^^^^^^ macros are not allowed here
```

Fix rust-lang#146325.
unstable proc_macro tracked::* rename/restructure

Picking up what should be the uncontroversial part of rust-lang#87173 (closed due to inactivity over two years ago).

Part of rust-lang#99515.

- move `proc_macro::tracked_env::var` to `proc_macro::tracked::env_var`
- move `proc_macro::tracked_path::path` to `proc_macro::tracked::path`
- change the argument of `proc_macro::tracked::path` from `AsRef<str>` to `AsRef<Path>`.
…e-code, r=davidtwco

attempt to fix unreachable code regression

For some reason it works, it checks function output type and suppress warning if type is uninhabited

~~This double negations in code breaks my mind actually~~

I'd love to revisit this part in future and try to find a proper solution maybe, but for now I feel like it's enough before release to fix the issue? I really wonder what team does think, especially `@cjgillot` and other people who are more confident in this part of compiler than I do

I tried a lot of things here, it's only approach that pass all tests included new regression one

fixes rust-lang#149571

r? compiler
…oieni

Mirror `ubuntu:24.04` on ghcr

The miri job wants to use it (https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Adding.20a.20C.2B.2B.20dependency.20to.20Miri.3F/with/560654845), and sooner or later we will likely migrate our CI to it too.

r? `@marcoieni`
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-run-make Area: port run-make Makefiles to rmake.rs 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. 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. rollup A PR which is a rollup labels Dec 9, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Dec 9, 2025

📌 Commit a00807e 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 Dec 9, 2025
bors added a commit that referenced this pull request Dec 9, 2025
Rollup of 5 pull requests

Successful merges:

 - #144938 (Enable `outline-atomics` by default on more AArch64 platforms)
 - #146579 (Handle macro invocation in attribute during parse)
 - #149400 (unstable proc_macro tracked::* rename/restructure)
 - #149664 (attempt to fix unreachable code regression )
 - #149806 (Mirror `ubuntu:24.04` on ghcr)

Failed merges:

 - #149789 (Cleanup in the attribute parsers)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Collaborator

bors commented Dec 9, 2025

⌛ Testing commit a00807e with merge 5d4c935...

@bors
Copy link
Collaborator

bors commented Dec 9, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 9, 2025
@matthiaskrgr
Copy link
Member Author

@bors retry

@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 Dec 9, 2025
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-msvc-ext1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Command `D:\a\rust\rust\build\x86_64-pc-windows-msvc\stage1-tools-bin\cargotest.exe D:\a\rust\rust\build\x86_64-pc-windows-msvc\stage2-tools-bin\cargo.exe D:\a\rust\rust\build\ct` failed with exit code 101
Created at: src\bootstrap\src\core\build_steps\tool.rs:1612:23
Executed at: src\bootstrap\src\core\build_steps\test.rs:323:29

Command has failed. Rerun with -v to see more details.
Bootstrap failed while executing `--stage 2 test src/tools/cargotest src/tools/cargo`
Build completed unsuccessfully in 1:41:43
  local time: Tue Dec  9 21:28:54 CUT 2025
  network time: Tue, 09 Dec 2025 21:28:54 GMT
##[error]Process completed with exit code 1.

@bors
Copy link
Collaborator

bors commented Dec 9, 2025

⌛ Testing commit a00807e with merge 5f1173b...

@bors
Copy link
Collaborator

bors commented Dec 10, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 5f1173b to main...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 10, 2025
@bors bors merged commit 5f1173b into rust-lang:main Dec 10, 2025
12 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Dec 10, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#144938 Enable outline-atomics by default on more AArch64 platfor… b583aa25de6aa4b4cec42caa2ebd2e284e1a76f3 (link)
#146579 Handle macro invocation in attribute during parse baf3ab6a192292c14b4e9d83e9b01ca038e61d9c (link)
#149400 unstable proc_macro tracked::* rename/restructure f04e1d2b95028b06246e9541f612c562be4d4bae (link)
#149664 attempt to fix unreachable code regression 2fe9b5185e04298df9b0f3c1bb5e9201d846633a (link)
#149806 Mirror ubuntu:24.04 on ghcr b1cade7750664966db808a8e533a4599c6b4113f (link)

previous master: c61a3a44d1

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

@github-actions
Copy link
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 c61a3a4 (parent) -> 5f1173b (this PR)

Test differences

Show 32 test diffs

Stage 1

  • [ui] tests/ui/parser/macro/expr-in-attribute.rs: [missing] -> pass (J1)
  • [ui] tests/ui/parser/macro/macro-in-attribute.rs: [missing] -> pass (J1)
  • [ui] tests/ui/uninhabited/uninhabited-unreachable-warning-149571.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/parser/macro/expr-in-attribute.rs: [missing] -> pass (J0)
  • [ui] tests/ui/parser/macro/macro-in-attribute.rs: [missing] -> pass (J0)
  • [ui] tests/ui/uninhabited/uninhabited-unreachable-warning-149571.rs: [missing] -> pass (J0)

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

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 5f1173bb2b0a7012640bd5383c61b433b16a452d --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. aarch64-apple: 10755.1s -> 8358.3s (-22.3%)
  2. pr-check-1: 2020.4s -> 1696.2s (-16.0%)
  3. aarch64-gnu-debug: 4470.0s -> 3832.5s (-14.3%)
  4. x86_64-gnu-llvm-20: 2836.2s -> 2433.7s (-14.2%)
  5. dist-x86_64-apple: 9308.9s -> 8004.3s (-14.0%)
  6. x86_64-gnu-gcc: 3400.4s -> 2966.0s (-12.8%)
  7. dist-aarch64-msvc: 6059.8s -> 5295.4s (-12.6%)
  8. x86_64-gnu-llvm-20-3: 6517.7s -> 5726.8s (-12.1%)
  9. x86_64-gnu-tools: 3613.6s -> 3217.4s (-11.0%)
  10. aarch64-gnu-llvm-20-1: 3743.4s -> 3335.9s (-10.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.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5f1173b): 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

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

mean range count
Regressions ❌
(primary)
0.2% [0.1%, 0.3%] 18
Regressions ❌
(secondary)
0.3% [0.2%, 0.5%] 13
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.4% [-0.6%, -0.3%] 3
All ❌✅ (primary) 0.2% [0.1%, 0.3%] 18

Max RSS (memory usage)

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

Cycles

Results (primary -2.7%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.7% [-2.8%, -2.5%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.7% [-2.8%, -2.5%] 2

Binary size

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

Bootstrap: 471.772s -> 471.137s (-0.13%)
Artifact size: 389.00 MiB -> 389.02 MiB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-run-make Area: port run-make Makefiles to rmake.rs merged-by-bors This PR was explicitly merged by bors. 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-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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants