Disconnect jemalloc stats and prof until after default feature-shifting.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -32,12 +32,12 @@ jemalloc = [
|
|||||||
]
|
]
|
||||||
jemalloc_conf = []
|
jemalloc_conf = []
|
||||||
jemalloc_prof = [
|
jemalloc_prof = [
|
||||||
"tikv-jemalloc-sys/profiling",
|
#"tikv-jemalloc-sys/profiling",
|
||||||
]
|
]
|
||||||
jemalloc_stats = [
|
jemalloc_stats = [
|
||||||
"tikv-jemalloc-sys/stats",
|
#"tikv-jemalloc-sys/stats",
|
||||||
"tikv-jemalloc-ctl/stats",
|
#"tikv-jemalloc-ctl/stats",
|
||||||
"tikv-jemallocator/stats",
|
#"tikv-jemallocator/stats",
|
||||||
]
|
]
|
||||||
perf_measurements = []
|
perf_measurements = []
|
||||||
release_max_log_level = [
|
release_max_log_level = [
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ pub static malloc_conf: &[u8] = const_str::concat_bytes!(
|
|||||||
",metadata_thp:always",
|
",metadata_thp:always",
|
||||||
",background_thread:true",
|
",background_thread:true",
|
||||||
",max_background_threads:-1",
|
",max_background_threads:-1",
|
||||||
MALLOC_CONF_PROF,
|
//MALLOC_CONF_PROF,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -38,12 +38,12 @@ pub static malloc_conf: &[u8] = const_str::concat_bytes!(
|
|||||||
feature = "jemalloc_prof",
|
feature = "jemalloc_prof",
|
||||||
target_arch = "x86_64",
|
target_arch = "x86_64",
|
||||||
))]
|
))]
|
||||||
const MALLOC_CONF_PROF: &str = ",prof_active:false";
|
const _MALLOC_CONF_PROF: &str = ",prof_active:false";
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
feature = "jemalloc_conf",
|
feature = "jemalloc_conf",
|
||||||
any(not(feature = "jemalloc_prof"), not(target_arch = "x86_64")),
|
any(not(feature = "jemalloc_prof"), not(target_arch = "x86_64")),
|
||||||
))]
|
))]
|
||||||
const MALLOC_CONF_PROF: &str = "";
|
const _MALLOC_CONF_PROF: &str = "";
|
||||||
|
|
||||||
#[global_allocator]
|
#[global_allocator]
|
||||||
static JEMALLOC: jemalloc::Jemalloc = jemalloc::Jemalloc;
|
static JEMALLOC: jemalloc::Jemalloc = jemalloc::Jemalloc;
|
||||||
@@ -62,7 +62,8 @@ fn _static_initialization() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg(feature = "jemalloc_stats")]
|
#[cfg(disable)]
|
||||||
|
//#[cfg(feature = "jemalloc_stats")]
|
||||||
pub fn memory_usage() -> Option<String> {
|
pub fn memory_usage() -> Option<String> {
|
||||||
use mallctl::stats;
|
use mallctl::stats;
|
||||||
|
|
||||||
@@ -91,7 +92,7 @@ pub fn memory_usage() -> Option<String> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[cfg(not(feature = "jemalloc_stats"))]
|
//#[cfg(not(feature = "jemalloc_stats"))]
|
||||||
pub fn memory_usage() -> Option<String> { None }
|
pub fn memory_usage() -> Option<String> { None }
|
||||||
|
|
||||||
pub fn memory_stats(opts: &str) -> Option<String> {
|
pub fn memory_stats(opts: &str) -> Option<String> {
|
||||||
|
|||||||
Reference in New Issue
Block a user