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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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