chore(deps): use tikv-jemallocator instead of jemallocator (#7232)

This commit is contained in:
DaniPopes
2024-03-19 18:13:23 +01:00
committed by GitHub
parent ce89a2be8d
commit 9d039a233c
10 changed files with 79 additions and 96 deletions

View File

@ -7,11 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true
[lints]
workspace = true
[dependencies]
# reth
reth-primitives.workspace = true
@ -78,27 +76,23 @@ tracing.workspace = true
# crypto
alloy-rlp.workspace = true
secp256k1 = { workspace = true, features = [
"global-context",
"rand-std",
"recovery",
] }
secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] }
# async
futures.workspace = true
[target.'cfg(not(windows))'.dependencies]
jemalloc-ctl = { version = "0.5.0", optional = true }
[target.'cfg(unix)'.dependencies]
tikv-jemalloc-ctl = { version = "0.5.0", optional = true }
[target.'cfg(target_os = "linux")'.dependencies]
procfs = { version = "0.16.0" }
procfs = "0.16.0"
[dev-dependencies]
# test vectors generation
proptest.workspace = true
tempfile.workspace = true
jsonrpsee.workspace = true
assert_matches.version = "1.5.0"
assert_matches = "1.5.0"
[features]
optimism = [
@ -114,10 +108,10 @@ optimism = [
"reth-auto-seal-consensus/optimism",
"reth-consensus-common/optimism",
"reth-blockchain-tree/optimism",
"reth-beacon-consensus/optimism"
"reth-beacon-consensus/optimism",
]
jemalloc = ["dep:jemalloc-ctl"]
jemalloc = ["dep:tikv-jemalloc-ctl"]
[build-dependencies]
vergen = { version = "8.0.0", features = ["build", "cargo", "git", "gitcl"] }

View File

@ -132,8 +132,8 @@ where
#[cfg(all(feature = "jemalloc", unix))]
fn collect_memory_stats() {
use jemalloc_ctl::{epoch, stats};
use metrics::gauge;
use tikv_jemalloc_ctl::{epoch, stats};
use tracing::error;
if epoch::advance().map_err(|error| error!(%error, "Failed to advance jemalloc epoch")).is_err()