Skip to content

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Sep 30, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

madsmtm and others added 14 commits September 13, 2025 20:16
This allows building a rustc capable of running the frontend without any
backend present. While this may not seem all that useful, it allows
running the frontend of rustc to report errors or running miri to
interpret a program without any backend present. This is useful when you
are trying to say run miri in the browser as upstream LLVM can't be
compiled for wasm yet. Or to run rustc itself in miri like I did a while
ago and caught some UB.
Accessing the thread id is often used in profiling and debugging, as
well as some approaches for sound single-threaded access to data.

Currently the only way to access the thread id is by first obtaining a
handle to the current thread. While this is not exactly slow, it does
require an atomic inc-ref and dec-ref operation, as well as the
injection of `Thread`'s drop code into the caller.

This publicly exposes the existing fast-path for accessing the current
thread id.
…r, r=joshtriplett,tgross35

Add fast-path for accessing the current thread id

Accessing the thread id is often used in profiling and debugging, as well as some approaches for sound single-threaded access to shared data.

Currently the only way to access the thread id is by first obtaining a handle to the current thread. While this is not exactly slow, it does require an atomic inc-ref and dec-ref operation, as well as the injection of `Thread`'s drop code into the caller.

This publicly exposes the existing fast-path for accessing the current thread id.

edit: ACP: rust-lang/libs-team#650
…rrowLii

Improve the documentation around `ZERO_AR_DATE`

In particular, document why we don't use the new `-reproducible` flag.

I went through [the source for Apple's old linker](https://github.com/apple-oss-distributions/ld64), and compared the versions with [the mapping to Xcode versions on Wikipedia](https://en.wikipedia.org/wiki/Xcode) to find the relevant Xcode versions for these features.

r? compiler
Add a dummy codegen backend

This allows building a rustc capable of running the frontend without any backend present. While this may not seem all that useful, it allows running the frontend of rustc to report errors or running miri to interpret a program without any backend present. This is useful when you are trying to say run miri in the browser as upstream LLVM can't be compiled for wasm yet. Or to run rustc itself in miri like I did a while ago and caught some UB.
…arrowLii

Don’t suggest foreign `doc(hidden)` types in "the following other types implement trait" diagnostics

Fixes rust-lang#132024.

``@rustbot`` label A-diagnostics T-compiler
cg_llvm: Stop using `as_c_char_ptr` for coverage-related bindings

[As explained by a note in `ffi.rs`](https://github.com/rust-lang/rust/blob/8a1b39995e5b630c5872f5de5079f1f569bd5ac2/compiler/rustc_codegen_llvm/src/llvm/ffi.rs#L4-L11), passing strings and byte slices through FFI is more convenient if we take advantage of the fact that `*const c_uchar` and `*const c_char` have the same ABI.

Doing so avoids having to rely on a special helper function, since we can just call `as_ptr` instead.

(The same logic applies to every other binding that currently uses the `as_c_char_ptr` helper; I just haven't adjusted all of them yet.)

---

As a drive-by change, this PR also marks some coverage-related FFI bindings as `safe`.
…r=lcnr

Fix the bevy implied bounds hack for the next solver

The diff is trivial, of course, and basically what you already suggested. Mostly dug around a bunch to learn. I hope this is roughly what you had in mind.

Fixes rust-lang/trait-system-refactor-initiative#236.

r? `@lcnr`
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-apple Operating system: Apple (macOS, iOS, tvOS, visionOS, watchOS) 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-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Sep 30, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Sep 30, 2025

📌 Commit 598ba1f 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 Sep 30, 2025
bors added a commit that referenced this pull request Sep 30, 2025
Rollup of 6 pull requests

Successful merges:

 - #143069 (Add fast-path for accessing the current thread id)
 - #146518 (Improve the documentation around `ZERO_AR_DATE`)
 - #146596 (Add a dummy codegen backend)
 - #146617 (Don’t suggest foreign `doc(hidden)` types in "the following other types implement trait" diagnostics)
 - #146635 (cg_llvm: Stop using `as_c_char_ptr` for coverage-related bindings)
 - #147184 (Fix the bevy implied bounds hack for the next solver)

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

bors commented Sep 30, 2025

⌛ Testing commit 598ba1f with merge df77923...

@matthiaskrgr
Copy link
Member Author

@bors retry

@bors
Copy link
Collaborator

bors commented Oct 1, 2025

⌛ Testing commit 598ba1f with merge 1e1a394...

@bors
Copy link
Collaborator

bors commented Oct 1, 2025

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 1, 2025
@bors bors merged commit 1e1a394 into rust-lang:master Oct 1, 2025
11 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 1, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#143069 Add fast-path for accessing the current thread id f2008fcb8c01e3abf0a7861da3cb01f4e91edcc6 (link)
#146518 Improve the documentation around ZERO_AR_DATE b77ee9965e70a803c01f1a91195af886eaf3efd9 (link)
#146596 Add a dummy codegen backend 7c0a7b5f0d1c1d8f91aee6e360578facc4520d63 (link)
#146617 Don’t suggest foreign doc(hidden) types in "the followi… 3cf9fd9cd1c954353ccd61368e9132fed159361b (link)
#146635 cg_llvm: Stop using as_c_char_ptr for coverage-related bi… 1a2d64761844ba649cf667c873173e489abdce05 (link)
#147184 Fix the bevy implied bounds hack for the next solver f11c36b64fe7a9573d2008a7a6c90aeb03c6861f (link)

previous master: fa3155a644

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

Copy link
Contributor

github-actions bot commented Oct 1, 2025

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 fa3155a (parent) -> 1e1a394 (this PR)

Test differences

Show 132 test diffs

Stage 1

  • [ui] tests/ui/implied-bounds/bevy_world_query.rs: pass -> [missing] (J1)
  • [ui] tests/ui/implied-bounds/bevy_world_query.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/implied-bounds/bevy_world_query.rs#next: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/implied-bounds/bevy_world_query.rs: pass -> [missing] (J0)
  • [ui] tests/ui/implied-bounds/bevy_world_query.rs#current: [missing] -> pass (J0)
  • [ui] tests/ui/implied-bounds/bevy_world_query.rs#next: [missing] -> pass (J0)

Additionally, 126 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 1e1a39441bd11aba541a48ba714d939490fc7b85 --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. dist-aarch64-apple: 7415.9s -> 12085.5s (63.0%)
  2. dist-x86_64-apple: 7243.2s -> 8650.4s (19.4%)
  3. aarch64-msvc-2: 5967.7s -> 4819.3s (-19.2%)
  4. aarch64-gnu-llvm-20-1: 3300.0s -> 3820.3s (15.8%)
  5. i686-gnu-1: 7230.4s -> 8283.0s (14.6%)
  6. x86_64-rust-for-linux: 2684.1s -> 3067.7s (14.3%)
  7. i686-gnu-2: 5360.3s -> 6084.0s (13.5%)
  8. aarch64-gnu: 6164.6s -> 6981.5s (13.3%)
  9. dist-apple-various: 4096.1s -> 3662.2s (-10.6%)
  10. dist-armhf-linux: 4647.4s -> 5131.3s (10.4%)
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 (1e1a394): comparison URL.

Overall result: ❌✅ regressions and 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.

mean range count
Regressions ❌
(primary)
1.2% [1.2%, 1.2%] 1
Regressions ❌
(secondary)
1.2% [1.2%, 1.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 1
All ❌✅ (primary) 1.2% [1.2%, 1.2%] 1

Max RSS (memory usage)

Results (secondary 0.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)
2.9% [2.9%, 3.0%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.8% [-3.8%, -3.8%] 1
All ❌✅ (primary) - - 0

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: 470.387s -> 471.179s (0.17%)
Artifact size: 387.74 MiB -> 387.76 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. merged-by-bors This PR was explicitly merged by bors. O-apple Operating system: Apple (macOS, iOS, tvOS, visionOS, watchOS) 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-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