Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Apply LTO config to rustdoc #135832

Merged
merged 1 commit into from
Jan 28, 2025
Merged

Apply LTO config to rustdoc #135832

merged 1 commit into from
Jan 28, 2025

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Jan 21, 2025

Before, the LTO configuration from config.toml was not applied to rustdoc. This provides a small perf. and binary size win for doc builds.

Since this is configured with Cargo profiles and not rustflags, it should not break tool build cache (#131155). I tried to run x test miri, x test rustdoc and x test miri and nothing was rebuilt.

r? @onur-ozkan

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jan 21, 2025
@onur-ozkan
Copy link
Member

That's a good imrovement. You may want to add a change entry for this :)

@Kobzol
Copy link
Contributor Author

Kobzol commented Jan 21, 2025

Ok, I'll do that. Let's also double check that the perf. win applies on this PR.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 21, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 21, 2025
Apply LTO config to rustdoc

Before, the LTO configuration from `config.toml` was not applied to `rustdoc`. This provides a small perf. and binary size [win](rust-lang#112049 (comment)) for doc builds.

Since this is configured with Cargo profiles and not rustflags, it should not break tool build cache (rust-lang#131155). I tried to run `x test miri`, `x test rustdoc` and `x test miri` and nothing was rebuilt.

r? `@onur-ozkan`
@bors
Copy link
Contributor

bors commented Jan 21, 2025

⌛ Trying commit 2a25286 with merge 5f13723...

@bors
Copy link
Contributor

bors commented Jan 21, 2025

☀️ Try build successful - checks-actions
Build commit: 5f13723 (5f13723e9423dd9c2e1962e48d07a29942d2daea)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5f13723): 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.3% [-0.6%, -0.2%] 9
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.2%] 3
All ❌✅ (primary) -0.3% [-0.6%, -0.2%] 9

Max RSS (memory usage)

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

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: 764.328s -> 765.487s (0.15%)
Artifact size: 326.09 MiB -> 325.96 MiB (-0.04%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 21, 2025
Before, the LTO configuration from `config.toml` was not applied to `rustdoc`.
@Kobzol
Copy link
Contributor Author

Kobzol commented Jan 22, 2025

Updated the change tracker.

@rustbot ready

@onur-ozkan
Copy link
Member

thanks

@bors r+

@bors
Copy link
Contributor

bors commented Jan 22, 2025

📌 Commit 1fe351b has been approved by onur-ozkan

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 Jan 22, 2025
@bors
Copy link
Contributor

bors commented Jan 28, 2025

⌛ Testing commit 1fe351b with merge 77a4553...

@bors
Copy link
Contributor

bors commented Jan 28, 2025

☀️ Test successful - checks-actions
Approved by: onur-ozkan
Pushing 77a4553 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 28, 2025
@bors bors merged commit 77a4553 into rust-lang:master Jan 28, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 28, 2025
@Kobzol Kobzol deleted the rustdoc-lto branch January 28, 2025 20:58
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (77a4553): 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.3% [-0.6%, -0.2%] 9
Improvements ✅
(secondary)
-0.6% [-1.4%, -0.2%] 4
All ❌✅ (primary) -0.3% [-0.6%, -0.2%] 9

Max RSS (memory usage)

Results (primary -3.1%)

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

Cycles

Results (secondary 1.1%)

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

Binary size

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

Bootstrap: 772.605s -> 771.05s (-0.20%)
Artifact size: 328.25 MiB -> 328.24 MiB (-0.00%)

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 5, 2025
Only apply LTO to rustdoc at stage 2

It doesn't make much sense at stage 1, and it was broken anyway. This was implemented in rust-lang#135832. The issue with LTO and stage 1 rustdoc was reported [here](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/x.20test.20with.20lto.20.3D.20.22thin.22.20fails.20to.20build.20rustdoc.3F).

r? `@onur-ozkan`
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 7, 2025
…ur-ozkan

Only apply LTO to rustdoc at stage 2

It doesn't make much sense at stage 1, and it was broken anyway. This was implemented in rust-lang#135832. The issue with LTO and stage 1 rustdoc was reported [here](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/x.20test.20with.20lto.20.3D.20.22thin.22.20fails.20to.20build.20rustdoc.3F).

r? `@onur-ozkan`
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 11, 2025
…ur-ozkan

Only apply LTO to rustdoc at stage 2

It doesn't make much sense at stage 1, and it was broken anyway. This was implemented in rust-lang#135832. The issue with LTO and stage 1 rustdoc was reported [here](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/x.20test.20with.20lto.20.3D.20.22thin.22.20fails.20to.20build.20rustdoc.3F).

r? `@onur-ozkan`
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Feb 13, 2025
Only apply LTO to rustdoc at stage 2

It doesn't make much sense at stage 1, and it was broken anyway. This was implemented in rust-lang/rust#135832. The issue with LTO and stage 1 rustdoc was reported [here](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/x.20test.20with.20lto.20.3D.20.22thin.22.20fails.20to.20build.20rustdoc.3F).

r? `@onur-ozkan`
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Feb 13, 2025
Only apply LTO to rustdoc at stage 2

It doesn't make much sense at stage 1, and it was broken anyway. This was implemented in rust-lang/rust#135832. The issue with LTO and stage 1 rustdoc was reported [here](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/x.20test.20with.20lto.20.3D.20.22thin.22.20fails.20to.20build.20rustdoc.3F).

r? `@onur-ozkan`
github-merge-queue bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Feb 17, 2025
Only apply LTO to rustdoc at stage 2

It doesn't make much sense at stage 1, and it was broken anyway. This was implemented in rust-lang/rust#135832. The issue with LTO and stage 1 rustdoc was reported [here](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/x.20test.20with.20lto.20.3D.20.22thin.22.20fails.20to.20build.20rustdoc.3F).

r? `@onur-ozkan`
# for free to join this conversation on GitHub. Already have an account? # 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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants