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

Use mimalloc as global_allocator for rustc_driver #122369

Closed
wants to merge 3 commits into from

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Mar 12, 2024

This changes the Rust global allocator for rustc_driver to mimalloc, leaving LLVM unaffected.

Based on #122362.

@rustbot
Copy link
Collaborator

rustbot commented Mar 12, 2024

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

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc 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. labels Mar 12, 2024
@lqd
Copy link
Member

lqd commented Mar 12, 2024

Has anything changed since we last evaluated mimalloc and decided we wouldn't use it over jemalloc on linux?

@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 12, 2024

I'd like to see the memory use of a mimalloc + jemalloc mix.

@lqd
Copy link
Member

lqd commented Mar 12, 2024

Ok then we can wait another hour for #122362's results in case there's an issue there, and then trigger a run for this PR. I'm not sure what code will get mimalloc vs jemalloc's symbol overrides (if any) but we'll see.

In the meantime:

@bors try

@bors
Copy link
Contributor

bors commented Mar 12, 2024

⌛ Trying commit 3482094 with merge 7c1e667...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 12, 2024
Use `mimalloc` as `global_allocator` for `rustc_driver`

This changes the Rust global allocator for `rustc_driver` to `mimalloc`, leaving LLVM unaffected.

Based on rust-lang#122362.
@bors
Copy link
Contributor

bors commented Mar 12, 2024

☀️ Try build successful - checks-actions
Build commit: 7c1e667 (7c1e66778214e445126667614fe1d6a72eb7d2ea)

@lqd
Copy link
Member

lqd commented Mar 12, 2024

@rust-timer build 7c1e667

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7c1e667): 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 a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.5% [0.3%, 0.6%] 3
Improvements ✅
(primary)
-2.7% [-7.7%, -0.5%] 214
Improvements ✅
(secondary)
-2.8% [-6.4%, -0.6%] 214
All ❌✅ (primary) -2.7% [-7.7%, -0.5%] 214

Max RSS (memory usage)

Results

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)
3.5% [1.0%, 21.4%] 62
Regressions ❌
(secondary)
9.1% [1.7%, 35.5%] 68
Improvements ✅
(primary)
-3.5% [-5.7%, -1.6%] 9
Improvements ✅
(secondary)
-3.5% [-4.6%, -3.2%] 4
All ❌✅ (primary) 2.6% [-5.7%, 21.4%] 71

Cycles

Results

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)
-2.3% [-4.9%, -0.9%] 73
Improvements ✅
(secondary)
-3.5% [-9.6%, -2.0%] 96
All ❌✅ (primary) -2.3% [-4.9%, -0.9%] 73

Binary size

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

Bootstrap: 672.558s -> 667.981s (-0.68%)
Artifact size: 309.99 MiB -> 298.62 MiB (-3.67%)

@Zoxc Zoxc closed this Mar 13, 2024
@klensy klensy mentioned this pull request Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants