Skip to content

Commit 490b2cc

Browse files
committed
Auto merge of #133792 - lqd:jemallocup, r=Mark-Simulacrum
switch `jemalloc-sys` back to `tikv-jemalloc-sys`, and update to 0.6.0 Some context: - we used to use jemalloc bindings from https://github.com/gnzlbg/jemallocator, since #55238 - that crate was abandoned, picked up as a fork in https://github.com/tikv/jemallocator, so we switched to that in #83152. - then they were able to publish to the original `jemalloc-sys` bindings crate, and `jemalloc-sys` and `tikv-jemalloc-sys` became the same thing -- so I switched back to the OG crate in #96790 - they're now having publishing problems again: I've been waiting for tikv/jemallocator#96 for the `jemalloc-sys` 0.6.0 update for a few months, but `tikv-jemalloc-sys` is already updated to 0.6.0. A perf run showed some improvements, so this PR switches back to `tikv-jemalloc-sys` to update to 0.6.0.
2 parents 8575f8f + a69fe84 commit 490b2cc

File tree

7 files changed

+23
-19
lines changed

7 files changed

+23
-19
lines changed

Cargo.lock

+12-12
Original file line numberDiff line numberDiff line change
@@ -1877,16 +1877,6 @@ version = "1.0.11"
18771877
source = "registry+https://github.com/rust-lang/crates.io-index"
18781878
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
18791879

1880-
[[package]]
1881-
name = "jemalloc-sys"
1882-
version = "0.5.4+5.3.0-patched"
1883-
source = "registry+https://github.com/rust-lang/crates.io-index"
1884-
checksum = "ac6c1946e1cea1788cbfde01c993b52a10e2da07f4bac608228d1bed20bfebf2"
1885-
dependencies = [
1886-
"cc",
1887-
"libc",
1888-
]
1889-
18901880
[[package]]
18911881
name = "jobserver"
18921882
version = "0.1.32"
@@ -2287,7 +2277,6 @@ dependencies = [
22872277
"ctrlc",
22882278
"directories",
22892279
"getrandom",
2290-
"jemalloc-sys",
22912280
"libc",
22922281
"libffi",
22932282
"libloading",
@@ -2297,6 +2286,7 @@ dependencies = [
22972286
"rustc_version",
22982287
"smallvec",
22992288
"tempfile",
2289+
"tikv-jemalloc-sys",
23002290
"ui_test",
23012291
"windows-sys 0.52.0",
23022292
]
@@ -3151,12 +3141,12 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
31513141
name = "rustc-main"
31523142
version = "0.0.0"
31533143
dependencies = [
3154-
"jemalloc-sys",
31553144
"rustc_codegen_ssa",
31563145
"rustc_driver",
31573146
"rustc_driver_impl",
31583147
"rustc_smir",
31593148
"stable_mir",
3149+
"tikv-jemalloc-sys",
31603150
]
31613151

31623152
[[package]]
@@ -5260,6 +5250,16 @@ dependencies = [
52605250
name = "tier-check"
52615251
version = "0.1.0"
52625252

5253+
[[package]]
5254+
name = "tikv-jemalloc-sys"
5255+
version = "0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7"
5256+
source = "registry+https://github.com/rust-lang/crates.io-index"
5257+
checksum = "cd3c60906412afa9c2b5b5a48ca6a5abe5736aec9eb48ad05037a677e52e4e2d"
5258+
dependencies = [
5259+
"cc",
5260+
"libc",
5261+
]
5262+
52635263
[[package]]
52645264
name = "time"
52655265
version = "0.3.36"

compiler/rustc/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ rustc_smir = { path = "../rustc_smir" }
2020
stable_mir = { path = "../stable_mir" }
2121
# tidy-alphabetical-end
2222

23-
[dependencies.jemalloc-sys]
24-
version = "0.5.0"
23+
[dependencies.tikv-jemalloc-sys]
24+
version = "0.6.0"
2525
optional = true
2626
features = ['unprefixed_malloc_on_supported_platforms']
2727

2828
[features]
2929
# tidy-alphabetical-start
30-
jemalloc = ['dep:jemalloc-sys']
30+
jemalloc = ['dep:tikv-jemalloc-sys']
3131
llvm = ['rustc_driver_impl/llvm']
3232
max_level_info = ['rustc_driver_impl/max_level_info']
3333
rustc_randomized_layouts = ['rustc_driver_impl/rustc_randomized_layouts']

compiler/rustc/src/main.rs

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ fn main() {
4343
{
4444
use std::os::raw::{c_int, c_void};
4545

46+
use tikv_jemalloc_sys as jemalloc_sys;
47+
4648
#[used]
4749
static _F1: unsafe extern "C" fn(usize, usize) -> *mut c_void = jemalloc_sys::calloc;
4850
#[used]

src/librustdoc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ extern crate test;
6868
// See docs in https://github.com/rust-lang/rust/blob/master/compiler/rustc/src/main.rs
6969
// about jemalloc.
7070
#[cfg(feature = "jemalloc")]
71-
extern crate jemalloc_sys;
71+
extern crate tikv_jemalloc_sys as jemalloc_sys;
7272

7373
use std::env::{self, VarError};
7474
use std::io::{self, IsTerminal};

src/tools/miri/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ directories = "5"
3131
# Copied from `compiler/rustc/Cargo.toml`.
3232
# But only for some targets, it fails for others. Rustc configures this in its CI, but we can't
3333
# easily use that since we support of-tree builds.
34-
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies.jemalloc-sys]
35-
version = "0.5.0"
34+
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies.tikv-jemalloc-sys]
35+
version = "0.6.0"
3636
features = ['unprefixed_malloc_on_supported_platforms']
3737

3838
[target.'cfg(unix)'.dependencies]

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

+2
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ fn jemalloc_magic() {
316316
// See there for further comments.
317317
use std::os::raw::{c_int, c_void};
318318

319+
use tikv_jemalloc_sys as jemalloc_sys;
320+
319321
#[used]
320322
static _F1: unsafe extern "C" fn(usize, usize) -> *mut c_void = jemalloc_sys::calloc;
321323
#[used]

src/tools/tidy/src/deps.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
307307
"intl_pluralrules",
308308
"itertools",
309309
"itoa",
310-
"jemalloc-sys",
311310
"jobserver",
312311
"lazy_static",
313312
"leb128",
@@ -392,6 +391,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
392391
"thiserror-impl",
393392
"thorin-dwp",
394393
"thread_local",
394+
"tikv-jemalloc-sys",
395395
"time",
396396
"time-core",
397397
"time-macros",

0 commit comments

Comments
 (0)