diff --git a/Makefile b/Makefile index b355991fe..260dcc95c 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/bin/reth/Cargo.toml b/bin/reth/Cargo.toml index 59a7b2651..c6b356053 100644 --- a/bin/reth/Cargo.toml +++ b/bin/reth/Cargo.toml @@ -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] diff --git a/bin/reth/src/lib.rs b/bin/reth/src/lib.rs index a3ba783bf..94a940828 100644 --- a/bin/reth/src/lib.rs +++ b/bin/reth/src/lib.rs @@ -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.