-
Notifications
You must be signed in to change notification settings - Fork 14k
Simplify jemalloc setup (without perf regression)
#148925
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
base: main
Are you sure you want to change the base?
Conversation
|
I could reproduce the performance regression locally, let's see if rustc-perf agrees: @bors try |
This comment has been minimized.
This comment has been minimized.
Fix performance regression with jemalloc
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
d4e5eb3 to
84a974f
Compare
|
@bors try |
This comment has been minimized.
This comment has been minimized.
Fix performance regression with jemalloc
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (aef7be6): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -0.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 2.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 475.201s -> 474.025s (-0.25%) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This is a great cleanup.
Feel free to r=me once you undraft the PR.
| /// See docs in https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc/src/main.rs | ||
| /// and https://github.com/rust-lang/rust/pull/146627 for why we need this `use` statement. | ||
| #[cfg(any(target_os = "linux", target_os = "macos"))] | ||
| use tikv_jemalloc_sys as _; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would extern crate be needed here too instead of the use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, miri already uses tikv_jemalloc_sys from Cargo, so extern crate and use work the same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that mean Miri suffers from the cc-rs issue? The comment in clippy seems to say that the extern crate thing is needed to avoid the cc-rs issue.
84a974f to
c690fa1
Compare
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy These commits modify the If this was unintentional then you should revert the changes before this PR is merged. The Miri subtree was changed cc @rust-lang/miri |
jemalloc setup (without perf regression)
Using the new `override_allocator_on_supported_platforms` feature in `tikv-jemalloc-sys v0.6.1` we can avoid the manual statics.
c690fa1 to
139754b
Compare
Reland #146627 after fixing the performance regression that caused it to be reverted in #148896.
This avoids 65f0b7a (second commit in the initial PR), and adds a comment explaining why
extern crateis needed here instead ofuse(we need to loadtikv_jemalloc_sysfrom the sysroot for some reason).r? Kobzol