Skip to content
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

Delete the cfg(not(parallel)) serial compiler #132282

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

Noratrieb
Copy link
Member

@Noratrieb Noratrieb commented Oct 28, 2024

Since it's inception a long time ago, the parallel compiler and its cfgs have been a maintenance burden. This was a necessary evil the allow iteration while not degrading performance because of synchronization overhead.

But this time is over. Thanks to the amazing work by the parallel working group (and the dyn sync crimes), the parallel compiler has now been fast enough to be shipped by default in nightly for quite a while now.
Stable and beta have still been on the serial compiler, because they can't use -Zthreads anyways.
But this is quite suboptimal:

  • the maintenance burden still sucks
  • we're not testing the serial compiler in nightly

Because of these reasons, it's time to end it. The serial compiler has served us well in the years since it was split from the parallel one, but it's over now.

Let the knight slay one head of the two-headed dragon!

#113349

Note that the default is still 1 thread, as more than 1 thread is still fairly broken.

cc @onur-ozkan to see if i did the bootstrap field removal correctly, @SparrowLii on the sync parts

@rustbot
Copy link
Collaborator

rustbot commented Oct 28, 2024

r? @cjgillot

rustbot has assigned @cjgillot.
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

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Oct 28, 2024
@rustbot
Copy link
Collaborator

rustbot commented Oct 28, 2024

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @TaKO8Ki

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@Noratrieb Noratrieb force-pushed the it-is-the-end-of-serial branch from fae56ab to 2e9696f Compare October 28, 2024 18:04
@rustbot
Copy link
Collaborator

rustbot commented Oct 28, 2024

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @TaKO8Ki

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@compiler-errors
Copy link
Member

cc rust-lang/compiler-team#681

@rust-log-analyzer

This comment has been minimized.

@Noratrieb Noratrieb force-pushed the it-is-the-end-of-serial branch from 2e9696f to 9c4a078 Compare October 28, 2024 18:23
@Noratrieb Noratrieb force-pushed the it-is-the-end-of-serial branch from 9c4a078 to 2c453de Compare October 28, 2024 18:39
@rustbot
Copy link
Collaborator

rustbot commented Oct 28, 2024

This PR modifies config.example.toml.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@bors
Copy link
Contributor

bors commented Nov 2, 2024

☔ The latest upstream changes (presumably #132513) made this pull request unmergeable. Please resolve the merge conflicts.

@Noratrieb Noratrieb force-pushed the it-is-the-end-of-serial branch from 2c453de to 09d2f62 Compare November 2, 2024 19:45
@Noratrieb
Copy link
Member Author

@bors p=1 many changes

Copy link
Contributor

@cjgillot cjgillot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust you cleaned-up the cfgs correctly.
Some cases of missed formatting for macros there and there, if you don't mind fixing them.
Does this need some kind of heads-up to the team?
r=me if doesn't.

compiler/rustc_data_structures/src/marker.rs Outdated Show resolved Hide resolved
@SparrowLii
Copy link
Member

SparrowLii commented Nov 8, 2024

From the discussion I think we can land this. @Noratrieb Could you help doing the format work as @cjgillot suggested?

@Noratrieb
Copy link
Member Author

Yes, I will do it, but it may take me a few days. Feel free to push the fix to my branch and approve it if you want to.

Since it's inception a long time ago, the parallel compiler and its cfgs
have been a maintenance burden. This was a necessary evil the allow
iteration while not degrading performance because of synchronization
overhead.

But this time is over. Thanks to the amazing work by the parallel
working group (and the dyn sync crimes), the parallel compiler has now
been fast enough to be shipped by default in nightly for quite a while
now.
Stable and beta have still been on the serial compiler, because they
can't use `-Zthreads` anyways.
But this is quite suboptimal:
- the maintenance burden still sucks
- we're not testing the serial compiler in nightly

Because of these reasons, it's time to end it. The serial compiler has
served us well in the years since it was split from the parallel one,
but it's over now.

Let the knight slay one head of the two-headed dragon!
@clubby789 clubby789 force-pushed the it-is-the-end-of-serial branch from 09d2f62 to 505b8e1 Compare November 12, 2024 13:39
@clubby789
Copy link
Contributor

@bors r=cjgillot rollup=never

@bors
Copy link
Contributor

bors commented Nov 12, 2024

📌 Commit 505b8e1 has been approved by cjgillot

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 Nov 12, 2024
@bors
Copy link
Contributor

bors commented Nov 12, 2024

⌛ Testing commit 505b8e1 with merge 6503543...

@bors
Copy link
Contributor

bors commented Nov 12, 2024

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing 6503543 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 12, 2024
@bors bors merged commit 6503543 into rust-lang:master Nov 12, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 12, 2024
@Noratrieb Noratrieb deleted the it-is-the-end-of-serial branch November 12, 2024 18:50
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6503543): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (primary -1.0%)

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

Cycles

Results (secondary 2.0%)

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)
2.0% [1.8%, 2.2%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 787.726s -> 784.558s (-0.40%)
Artifact size: 335.35 MiB -> 335.34 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc 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