Skip to content

Conversation

Zalathar
Copy link
Contributor

These code paths are surprisingly hot in the large-workspace benchmark (e.g. see perf changes from #146700), suggesting room for more improvement. It would be handy to see some detailed timings and execution counts.

These code paths are surprisingly hot in the `large-workspace` benchmark; it
would be handy to see some detailed timings and execution counts.
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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. labels Sep 21, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 21, 2025

r? @lcnr

rustbot has assigned @lcnr.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@Zalathar
Copy link
Contributor Author

This PR won't have a perf impact on its own, but I would like to see a preview of the measurements it produces.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 21, 2025
Add self-profile events for target-machine creation
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 21, 2025
@rust-bors
Copy link

rust-bors bot commented Sep 21, 2025

☀️ Try build successful (CI)
Build commit: 532db74 (532db7469e9a92676bcc8a3a65102314490c6df3, parent: 1d23da6b7304d9e2a2c3dcb1b0aaa709cb9bc4ad)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (532db74): comparison URL.

Overall result: ❌ regressions - no action needed

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.

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

Max RSS (memory usage)

Results (primary 3.5%)

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

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

Cycles

Results (primary 5.0%, 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.0% [5.0%, 5.0%] 1
Regressions ❌
(secondary)
4.6% [4.6%, 4.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-2.9%, -2.3%] 2
All ❌✅ (primary) 5.0% [5.0%, 5.0%] 1

Binary size

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

Bootstrap: 470.725s -> 470.112s (-0.13%)
Artifact size: 387.92 MiB -> 387.90 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 21, 2025
@Zalathar
Copy link
Contributor Author

No reason not to roll this up, if/when it's approved:

@bors rollup=always

@Kobzol
Copy link
Member

Kobzol commented Sep 22, 2025

Seems reasonable, thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 22, 2025

📌 Commit b17fb70 has been approved by Kobzol

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 22, 2025
@lcnr lcnr assigned Kobzol and unassigned lcnr Sep 22, 2025
bors added a commit that referenced this pull request Sep 22, 2025
Rollup of 9 pull requests

Successful merges:

 - #145411 (regression test for Cow<[u8]> layout)
 - #146397 (std_detect on Darwin AArch64: update features)
 - #146791 (emit attribute for readonly non-pure inline assembly)
 - #146831 (Support ctr and lr as clobber-only registers in PowerPC inline assembly)
 - #146838 (Introduce "wrapper" helpers to rustdoc)
 - #146845 (Add self-profile events for target-machine creation)
 - #146846 (btree InternalNode::new safety comments)
 - #146858 (Make mips64el-unknown-linux-muslabi64 link dynamically)
 - #146878 (assert_unsafe_precondition: fix some incorrect check_language_ub)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7b6553c into rust-lang:master Sep 22, 2025
11 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Sep 22, 2025
rust-timer added a commit that referenced this pull request Sep 22, 2025
Rollup merge of #146845 - Zalathar:prof-target-machine, r=Kobzol

Add self-profile events for target-machine creation

These code paths are surprisingly hot in the `large-workspace` benchmark (e.g. see perf changes from #146700), suggesting room for more improvement. It would be handy to see some detailed timings and execution counts.
@Zalathar Zalathar deleted the prof-target-machine branch September 22, 2025 21:10
Muscraft pushed a commit to Muscraft/rust that referenced this pull request Sep 24, 2025
…bzol

Add self-profile events for target-machine creation

These code paths are surprisingly hot in the `large-workspace` benchmark (e.g. see perf changes from rust-lang#146700), suggesting room for more improvement. It would be handy to see some detailed timings and execution counts.
Muscraft pushed a commit to Muscraft/rust that referenced this pull request Sep 24, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang#145411 (regression test for Cow<[u8]> layout)
 - rust-lang#146397 (std_detect on Darwin AArch64: update features)
 - rust-lang#146791 (emit attribute for readonly non-pure inline assembly)
 - rust-lang#146831 (Support ctr and lr as clobber-only registers in PowerPC inline assembly)
 - rust-lang#146838 (Introduce "wrapper" helpers to rustdoc)
 - rust-lang#146845 (Add self-profile events for target-machine creation)
 - rust-lang#146846 (btree InternalNode::new safety comments)
 - rust-lang#146858 (Make mips64el-unknown-linux-muslabi64 link dynamically)
 - rust-lang#146878 (assert_unsafe_precondition: fix some incorrect check_language_ub)

r? `@ghost`
`@rustbot` modify labels: rollup
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. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants