miri: use tikv-jemalloc-sys from sysroot#149252
Conversation
|
The Miri subtree was changed cc @rust-lang/miri These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
|
Does this need a perf run? I don't think Miri is tested in |
|
Miri has its own benchmark suite based on hyperfine that you can run with I'd be happy merging this without running any benchmarks. |
| /// | ||
| /// FIXME(madsmtm): This is loaded from the sysroot that was built with the other `rustc` crates | ||
| /// above, instead of via Cargo as you'd normally do. This is currently needed for LTO due to | ||
| /// https://github.com/rust-lang/cc-rs/issues/1613. |
There was a problem hiding this comment.
This also saves the time for building jemalloc again so that seems nice 🤷
There was a problem hiding this comment.
True, though that's also the case for a bunch of other common dependencies like serde, libc, regex etc. If this is actually a concern, we should work on a way to share dependencies across the board instead.
There was a problem hiding this comment.
tikv-jemalloc has a build script building C dependencies, making it super slow for check builds. That makes it a more worthwhile goal for this than pure Rust crates. Also the allocator is a global singleton after all so using exactly the rustc setup IMO makes a lot of sense.
This allows LTO to work when compiling jemalloc, which should yield a small performance boost, and makes miri's behaviour here match clippy and rustdoc.
ca9e58e to
522e47f
Compare
|
Thanks! LGTM. This does mean we won't usually use jemalloc when developing Miri in its own repo... but CI there tests with @bors r+ rollup |
Note that this then requires |
|
Ah, we may have to |
Rollup of 6 pull requests Successful merges: - #148234 (rustdoc: make mergeable crate info more usable) - #149201 (Add suggest alternatives for Out-of-range \x escapes) - #149208 ([rustdoc] Make more functions return `fmt::Result` and reduce number of `.unwrap()` calls) - #149252 (miri: use `tikv-jemalloc-sys` from sysroot) - #149255 (Use `let...else` consistently in user-facing diagnostics) - #149275 (Fix missing double-quote in `std::env::consts::OS` values) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #149252 - madsmtm:miri-jemalloc, r=RalfJung miri: use `tikv-jemalloc-sys` from sysroot This allows LTO to work when compiling jemalloc (which is currently broken due to rust-lang/cc-rs#1613), which should yield a small performance boost, and makes Miri's behaviour here match Clippy and Rustdoc. Follow-up to #148925 / #146627 after discussion in #148925 (review). r? RalfJung
Rollup of 6 pull requests Successful merges: - rust-lang/rust#148234 (rustdoc: make mergeable crate info more usable) - rust-lang/rust#149201 (Add suggest alternatives for Out-of-range \x escapes) - rust-lang/rust#149208 ([rustdoc] Make more functions return `fmt::Result` and reduce number of `.unwrap()` calls) - rust-lang/rust#149252 (miri: use `tikv-jemalloc-sys` from sysroot) - rust-lang/rust#149255 (Use `let...else` consistently in user-facing diagnostics) - rust-lang/rust#149275 (Fix missing double-quote in `std::env::consts::OS` values) r? `@ghost` `@rustbot` modify labels: rollup
…=Kobzol bootstrap: Miri now handles jemalloc like everything else rust-lang#149252 made Miri work like clippy here, so I think this comment can be removed?
…=Kobzol bootstrap: Miri now handles jemalloc like everything else rust-lang#149252 made Miri work like clippy here, so I think this comment can be removed?
…=Kobzol bootstrap: Miri now handles jemalloc like everything else rust-lang#149252 made Miri work like clippy here, so I think this comment can be removed?
Rollup of 6 pull requests Successful merges: - rust-lang/rust#148234 (rustdoc: make mergeable crate info more usable) - rust-lang/rust#149201 (Add suggest alternatives for Out-of-range \x escapes) - rust-lang/rust#149208 ([rustdoc] Make more functions return `fmt::Result` and reduce number of `.unwrap()` calls) - rust-lang/rust#149252 (miri: use `tikv-jemalloc-sys` from sysroot) - rust-lang/rust#149255 (Use `let...else` consistently in user-facing diagnostics) - rust-lang/rust#149275 (Fix missing double-quote in `std::env::consts::OS` values) r? `@ghost` `@rustbot` modify labels: rollup
This allows LTO to work when compiling jemalloc (which is currently broken due to rust-lang/cc-rs#1613), which should yield a small performance boost, and makes Miri's behaviour here match Clippy
and Rustdoc.
Follow-up to #148925 / #146627 after discussion in #148925 (review).
r? RalfJung