From 10edc3bd5e82044ddd2436b7b038c9d9e67f80ad Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 30 Nov 2025 04:35:28 +0000 Subject: [PATCH] Disconnect jemalloc stats and prof until after default feature-shifting. Signed-off-by: Jason Volk --- src/core/Cargo.toml | 8 ++++---- src/core/alloc/je.rs | 11 ++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/core/Cargo.toml b/src/core/Cargo.toml index d1bfdad9..95c8f1bc 100644 --- a/src/core/Cargo.toml +++ b/src/core/Cargo.toml @@ -32,12 +32,12 @@ jemalloc = [ ] jemalloc_conf = [] jemalloc_prof = [ - "tikv-jemalloc-sys/profiling", + #"tikv-jemalloc-sys/profiling", ] jemalloc_stats = [ - "tikv-jemalloc-sys/stats", - "tikv-jemalloc-ctl/stats", - "tikv-jemallocator/stats", + #"tikv-jemalloc-sys/stats", + #"tikv-jemalloc-ctl/stats", + #"tikv-jemallocator/stats", ] perf_measurements = [] release_max_log_level = [ diff --git a/src/core/alloc/je.rs b/src/core/alloc/je.rs index 54e879e9..483a46f7 100644 --- a/src/core/alloc/je.rs +++ b/src/core/alloc/je.rs @@ -29,7 +29,7 @@ pub static malloc_conf: &[u8] = const_str::concat_bytes!( ",metadata_thp:always", ",background_thread:true", ",max_background_threads:-1", - MALLOC_CONF_PROF, + //MALLOC_CONF_PROF, 0 ); @@ -38,12 +38,12 @@ pub static malloc_conf: &[u8] = const_str::concat_bytes!( feature = "jemalloc_prof", target_arch = "x86_64", ))] -const MALLOC_CONF_PROF: &str = ",prof_active:false"; +const _MALLOC_CONF_PROF: &str = ",prof_active:false"; #[cfg(all( feature = "jemalloc_conf", any(not(feature = "jemalloc_prof"), not(target_arch = "x86_64")), ))] -const MALLOC_CONF_PROF: &str = ""; +const _MALLOC_CONF_PROF: &str = ""; #[global_allocator] static JEMALLOC: jemalloc::Jemalloc = jemalloc::Jemalloc; @@ -62,7 +62,8 @@ fn _static_initialization() { } #[must_use] -#[cfg(feature = "jemalloc_stats")] +#[cfg(disable)] +//#[cfg(feature = "jemalloc_stats")] pub fn memory_usage() -> Option { use mallctl::stats; @@ -91,7 +92,7 @@ pub fn memory_usage() -> Option { } #[must_use] -#[cfg(not(feature = "jemalloc_stats"))] +//#[cfg(not(feature = "jemalloc_stats"))] pub fn memory_usage() -> Option { None } pub fn memory_stats(opts: &str) -> Option {