feat(cli): jemalloc-prof feature (#3322)

This commit is contained in:
Roman Krasiuk
2023-06-23 12:37:46 +03:00
committed by GitHub
parent d60aef5a16
commit f7d4756439
3 changed files with 6 additions and 1 deletions

View File

@ -55,7 +55,7 @@ build-native-%:
# The resulting binaries will be created in the `target/` directory.
# No jemalloc on Windows
build-x86_64-pc-windows-gnu: FEATURES := $(filter-out jemalloc,$(FEATURES))
build-x86_64-pc-windows-gnu: FEATURES := $(filter-out jemalloc jemalloc-prof,$(FEATURES))
# Note: The additional rustc compiler flags are for intrinsics needed by MDBX.
# See: https://github.com/cross-rs/cross/wiki/FAQ#undefined-reference-with-build-std

View File

@ -87,6 +87,7 @@ humantime = "2.1.0"
[features]
jemalloc = ["dep:jemallocator"]
jemalloc-prof = ["jemalloc", "jemallocator?/profiling"]
only-info-logs = ["tracing/release_max_level_info"]
[build-dependencies]

View File

@ -12,6 +12,10 @@
//! - `jemalloc`: Uses [jemallocator](https://github.com/tikv/jemallocator) as the global allocator.
//! This is **not recommended on Windows**. See [here](https://rust-lang.github.io/rfcs/1974-global-allocators.html#jemalloc)
//! for more info.
//! - `jemalloc-prof`: Enables [jemallocator's](https://github.com/tikv/jemallocator) heap profiling
//! and leak detection functionality. See [jemalloc's opt.prof](https://jemalloc.net/jemalloc.3.html#opt.prof)
//! documentation for usage details. This is **not recommended on Windows**. See [here](https://rust-lang.github.io/rfcs/1974-global-allocators.html#jemalloc)
//! for more info.
//! - `only-info-logs`: Disables all logs below `info` level. This can speed up the node, since
//! fewer calls to the logging component is made.