Skip to content

bootstrap: build std sans leaf frame pointers #141800

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

Merged

Conversation

workingjubilee
Copy link
Member

@workingjubilee workingjubilee commented May 30, 2025

Sometimes leaf frame-pointers can impact LLVM inlining choices, and that can be a real problem for things like mul_add.

Sometimes leaf frame-pointers can impact LLVM inlining choices, and
that can be a real problem for things like `mul_add`.
@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label May 30, 2025
@workingjubilee
Copy link
Member Author

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented May 31, 2025

⌛ Trying commit 2d5d55a with merge 53f6b1b

rust-bors bot added a commit that referenced this pull request May 31, 2025
…ers, r=<try>

bootstrap: build std with less frame pointers

Sometimes leaf frame-pointers can impact LLVM inlining choices, and that can be a real problem for things like `mul_add`.

r? `@ghost`
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 31, 2025
@rust-bors
Copy link

rust-bors bot commented May 31, 2025

☀️ Try build successful

  • CI
    Build commit: 53f6b1b (53f6b1bd2116ea8d2f8cbd88780fa56984c18c0e)

@rust-timer

This comment has been minimized.

@workingjubilee workingjubilee changed the title bootstrap: build std with less frame pointers bootstrap: build std sans leaf frame pointers May 31, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (53f6b1b): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

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

Max RSS (memory usage)

Results (secondary -0.4%)

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)
0.5% [0.5%, 0.5%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.7% [-0.9%, -0.4%] 7
All ❌✅ (primary) - - 0

Cycles

Results (secondary -0.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)
- - 0
Regressions ❌
(secondary)
1.0% [0.7%, 1.2%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.8% [-2.4%, -0.4%] 13
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.3%, secondary -0.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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.6%, -0.1%] 11
Improvements ✅
(secondary)
-0.6% [-0.6%, -0.4%] 38
All ❌✅ (primary) -0.3% [-0.6%, -0.1%] 11

Bootstrap: 778.921s -> 776.952s (-0.25%)
Artifact size: 370.25 MiB -> 370.14 MiB (-0.03%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 31, 2025
@workingjubilee
Copy link
Member Author

Performance is almost completely invisible on a large, noisy program like rustc. But the improvements are more notable in binary size where they are modest but consistent. Not sure how to interpret the wall-time regressions in large-workspace, though.

@workingjubilee workingjubilee marked this pull request as ready for review May 31, 2025 22:03
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 31, 2025
@saethlin
Copy link
Member

Not sure how to interpret the wall-time regressions in large-workspace, though.

Get a new commit hash and try again. It's probably instability.

@saethlin
Copy link
Member

Oh. Most of the large-workspace significance thresholds are still the default 0.20%. The significance estimations just aren't calibrated yet.

@workingjubilee
Copy link
Member Author

I'm gonna assume that means I shouldn't worry too much about it.

r? compiler

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 1, 2025
@saethlin
Copy link
Member

saethlin commented Jun 1, 2025

Yeah, there's just no information to be gleaned from that benchmark. Yet.

I don't know what the right reviewer group is for "how we build the precompiled sysroot" but I've been involved in this discussion a fair bit and support this change.

r? saethlin
@bors r+

@bors
Copy link
Collaborator

bors commented Jun 1, 2025

📌 Commit 2d5d55a has been approved by saethlin

It is now in the queue for this repository.

@rustbot rustbot assigned saethlin and unassigned jieyouxu Jun 1, 2025
@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 Jun 1, 2025
@bors
Copy link
Collaborator

bors commented Jun 6, 2025

⌛ Testing commit 2d5d55a with merge 868bf2d...

@bors
Copy link
Collaborator

bors commented Jun 7, 2025

☀️ Test successful - checks-actions
Approved by: saethlin
Pushing 868bf2d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 7, 2025
@bors bors merged commit 868bf2d into rust-lang:master Jun 7, 2025
10 checks passed
@rustbot rustbot added this to the 1.89.0 milestone Jun 7, 2025
Copy link
Contributor

github-actions bot commented Jun 7, 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 44f415c (parent) -> 868bf2d (this PR)

Test differences

No test diffs found

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 868bf2da31d1c6ead7016d5ee52eacfd2e2fd158 --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. x86_64-apple-1: 9697.9s -> 6534.4s (-32.6%)
  2. x86_64-apple-2: 5212.7s -> 3655.8s (-29.9%)
  3. dist-aarch64-apple: 4680.0s -> 5426.0s (15.9%)
  4. mingw-check-1: 1898.4s -> 1614.7s (-14.9%)
  5. dist-x86_64-apple: 9637.5s -> 8274.4s (-14.1%)
  6. x86_64-rust-for-linux: 2947.4s -> 2531.7s (-14.1%)
  7. i686-gnu-2: 6160.4s -> 5462.0s (-11.3%)
  8. x86_64-gnu-llvm-19-1: 3561.9s -> 3224.4s (-9.5%)
  9. x86_64-gnu-aux: 6515.8s -> 5918.6s (-9.2%)
  10. x86_64-gnu-llvm-20-2: 5954.7s -> 5434.4s (-8.7%)
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.

@workingjubilee workingjubilee deleted the build-std-with-less-leaf-pointers branch June 7, 2025 01:38
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (868bf2d): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

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

Max RSS (memory usage)

Results (primary 4.2%, secondary -4.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)
4.2% [4.2%, 4.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.6% [-4.6%, -4.6%] 1
All ❌✅ (primary) 4.2% [4.2%, 4.2%] 1

Cycles

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

Binary size

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

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)
0.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
-0.2% [-0.6%, -0.1%] 14
Improvements ✅
(secondary)
-0.5% [-0.6%, -0.3%] 41
All ❌✅ (primary) -0.2% [-0.6%, -0.1%] 14

Bootstrap: 752.053s -> 751.358s (-0.09%)
Artifact size: 372.47 MiB -> 372.51 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants