mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add support for wrapping the allocator with tracy (#10874)
This commit is contained in:
@ -18,17 +18,15 @@ reth-node-optimism.workspace = true
|
||||
|
||||
clap = { workspace = true, features = ["derive", "env"] }
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
tikv-jemallocator = { workspace = true, optional = true }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[features]
|
||||
default = ["jemalloc"]
|
||||
|
||||
jemalloc = ["dep:tikv-jemallocator"]
|
||||
jemalloc-prof = ["jemalloc", "tikv-jemallocator?/profiling"]
|
||||
jemalloc = ["reth-cli-util/jemalloc"]
|
||||
jemalloc-prof = ["reth-cli-util/jemalloc-prof"]
|
||||
tracy-allocator = ["reth-cli-util/tracy-allocator"]
|
||||
|
||||
asm-keccak = ["reth-optimism-cli/asm-keccak", "reth-node-optimism/asm-keccak"]
|
||||
|
||||
|
||||
@ -10,10 +10,8 @@ use reth_optimism_cli::{chainspec::OpChainSpecParser, Cli};
|
||||
use reth_optimism_rpc::SequencerClient;
|
||||
use reth_provider::providers::BlockchainProvider2;
|
||||
|
||||
// We use jemalloc for performance reasons
|
||||
#[cfg(all(feature = "jemalloc", unix))]
|
||||
#[global_allocator]
|
||||
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
|
||||
static ALLOC: reth_cli_util::allocator::Allocator = reth_cli_util::allocator::new_allocator();
|
||||
|
||||
fn main() {
|
||||
reth_cli_util::sigsegv_handler::install();
|
||||
|
||||
Reference in New Issue
Block a user