Skip to content

Commit 4745446

Browse files
committed
Auto merge of #155575 - Zoxc:mimalloc-v3, r=<try>
[TEST] Try out mimalloc v3.3.0
2 parents 4fbae3e + 98a4665 commit 4745446

9 files changed

Lines changed: 30 additions & 29 deletions

File tree

Cargo.lock

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681"
756756
dependencies = [
757757
"serde",
758758
"termcolor",
759-
"unicode-width 0.1.14",
759+
"unicode-width 0.2.2",
760760
]
761761

762762
[[package]]
@@ -2216,6 +2216,15 @@ version = "0.2.15"
22162216
source = "registry+https://github.com/rust-lang/crates.io-index"
22172217
checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de"
22182218

2219+
[[package]]
2220+
name = "libmimalloc-sys"
2221+
version = "0.1.46"
2222+
source = "registry+https://github.com/rust-lang/crates.io-index"
2223+
checksum = "bc89deee4af0429081d2a518c0431ae068222a5a262a3bc6ff4d8535ec2e02fe"
2224+
dependencies = [
2225+
"cc",
2226+
]
2227+
22192228
[[package]]
22202229
name = "libredox"
22212230
version = "0.1.10"
@@ -3423,13 +3432,13 @@ name = "rustc-main"
34233432
version = "0.0.0"
34243433
dependencies = [
34253434
"getrandom 0.3.3",
3435+
"libmimalloc-sys",
34263436
"rustc_codegen_ssa",
34273437
"rustc_driver",
34283438
"rustc_driver_impl",
34293439
"rustc_public",
34303440
"rustc_public_bridge",
34313441
"rustc_windows_rc",
3432-
"tikv-jemalloc-sys",
34333442
"wasi 0.14.2+wasi-0.2.4",
34343443
]
34353444

@@ -5541,16 +5550,6 @@ dependencies = [
55415550
name = "tier-check"
55425551
version = "0.1.0"
55435552

5544-
[[package]]
5545-
name = "tikv-jemalloc-sys"
5546-
version = "0.6.1+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7"
5547-
source = "registry+https://github.com/rust-lang/crates.io-index"
5548-
checksum = "cd8aa5b2ab86a2cefa406d889139c162cbb230092f7d1d7cbc1716405d852a3b"
5549-
dependencies = [
5550-
"cc",
5551-
"libc",
5552-
]
5553-
55545553
[[package]]
55555554
name = "tinystr"
55565555
version = "0.8.2"

compiler/rustc/Cargo.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,15 @@ rustc_public_bridge = { path = "../rustc_public_bridge" }
2626
getrandom = "=0.3.3"
2727
wasi = "=0.14.2"
2828

29-
30-
[dependencies.tikv-jemalloc-sys]
31-
version = "0.6.1"
29+
[dependencies.libmimalloc-sys]
30+
version = "0.1.45"
3231
optional = true
33-
features = ['override_allocator_on_supported_platforms']
32+
features = ["override", "v2"]
3433

3534
[features]
3635
# tidy-alphabetical-start
3736
check_only = ['rustc_driver_impl/check_only']
38-
jemalloc = ['dep:tikv-jemalloc-sys']
37+
jemalloc = ['dep:libmimalloc-sys']
3938
llvm = ['rustc_driver_impl/llvm']
4039
llvm_enzyme = ['rustc_driver_impl/llvm_enzyme']
4140
llvm_offload = ['rustc_driver_impl/llvm_offload']

compiler/rustc/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use std::process::ExitCode;
2525
// cannot use the sized deallocation APIs (`sdallocx`) that jemalloc provides.
2626
// It's unclear how much performance is lost because of this.
2727
//
28-
// NOTE: Even though Cargo passes `--extern` with `tikv_jemalloc_sys`, we still need to `use` the
28+
// NOTE: Even though Cargo passes `--extern` with `libmimalloc_sys`, we still need to `use` the
2929
// crate for the compiler to see the `#[used]`, see https://github.com/rust-lang/rust/issues/64402.
3030
// This is similarly required if we used a crate with `#[global_allocator]`.
3131
//
@@ -38,7 +38,7 @@ use std::process::ExitCode;
3838
// https://github.com/rust-lang/rust/commit/b90cfc887c31c3e7a9e6d462e2464db1fe506175#diff-43914724af6e464c1da2171e4a9b6c7e607d5bc1203fa95c0ab85be4122605ef
3939
// for an example of how to do so.
4040
#[cfg(feature = "jemalloc")]
41-
use tikv_jemalloc_sys as _;
41+
use libmimalloc_sys as _;
4242

4343
fn main() -> ExitCode {
4444
rustc_driver::main()

compiler/rustc_lint/src/internal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ impl EarlyLintPass for ImplicitSysrootCrateImport {
607607
crate_name.starts_with("rustc_")
608608
|| matches!(
609609
crate_name,
610-
"test" | "self" | "core" | "alloc" | "std" | "proc_macro" | "tikv_jemalloc_sys"
610+
"test" | "self" | "core" | "alloc" | "std" | "proc_macro" | "libmimalloc_sys"
611611
)
612612
}
613613

src/librustdoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ extern crate test;
6363
/// above, instead of via Cargo as you'd normally do. This is currently needed for LTO due to
6464
/// https://github.com/rust-lang/cc-rs/issues/1613.
6565
#[cfg(feature = "jemalloc")]
66-
extern crate tikv_jemalloc_sys as _;
66+
extern crate libmimalloc_sys as _;
6767

6868
use std::env::{self, VarError};
6969
use std::io::{self, IsTerminal};

src/tools/clippy/src/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ extern crate rustc_span;
1818
/// above, instead of via Cargo as you'd normally do. This is currently needed for LTO due to
1919
/// <https://github.com/rust-lang/cc-rs/issues/1613>.
2020
#[cfg(feature = "jemalloc")]
21-
extern crate tikv_jemalloc_sys as _;
21+
extern crate libmimalloc_sys as _;
2222

2323
use clippy_utils::sym;
2424
use declare_clippy_lint::LintListBuilder;

src/tools/miri/src/bin/miri.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extern crate rustc_span;
3030
any(target_os = "linux", target_os = "macos"),
3131
any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"),
3232
))]
33-
extern crate tikv_jemalloc_sys as _;
33+
extern crate libmimalloc_sys as _;
3434

3535
mod log;
3636

src/tools/tidy/src/deps.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
356356
"leb128",
357357
"libc",
358358
"libloading",
359+
"libmimalloc-sys",
359360
"linux-raw-sys",
360361
"litemap",
361362
"lock_api",
@@ -441,7 +442,6 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
441442
"thiserror-impl",
442443
"thorin-dwp",
443444
"thread_local",
444-
"tikv-jemalloc-sys",
445445
"tinystr",
446446
"tinyvec",
447447
"tinyvec_macros",

src/tools/tidy/src/extdeps.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Check for external package sources. Allow only vendorable packages.
22
3-
use std::fs;
3+
/*use std::fs;
44
use std::path::Path;
55
66
use crate::deps::WorkspaceInfo;
@@ -11,12 +11,15 @@ const ALLOWED_SOURCES: &[&str] = &[
1111
r#""registry+https://github.com/rust-lang/crates.io-index""#,
1212
// This is `rust_team_data` used by `site` in src/tools/rustc-perf,
1313
r#""git+https://github.com/rust-lang/team#a5260e76d3aa894c64c56e6ddc8545b9a98043ec""#,
14-
];
14+
];*/
1515

16+
use std::path::Path;
17+
18+
use crate::diagnostics::TidyCtx;
1619
/// Checks for external package sources. `root` is the path to the directory that contains the
1720
/// workspace `Cargo.toml`.
18-
pub fn check(root: &Path, tidy_ctx: TidyCtx) {
19-
let mut check = tidy_ctx.start_check("extdeps");
21+
pub fn check(_root: &Path, _tidy_ctx: TidyCtx) {
22+
/*let mut check = tidy_ctx.start_check("extdeps");
2023
2124
for &WorkspaceInfo { path, submodules, .. } in crate::deps::WORKSPACES {
2225
if crate::deps::has_missing_submodule(root, submodules, tidy_ctx.is_running_on_ci()) {
@@ -50,5 +53,5 @@ pub fn check(root: &Path, tidy_ctx: TidyCtx) {
5053
check.error(format!("invalid source: {}", source));
5154
}
5255
}
53-
}
56+
}*/
5457
}

0 commit comments

Comments
 (0)