File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -289,5 +289,9 @@ panic = "abort"
289
289
codegen-units = 1
290
290
overflow-checks = true
291
291
292
+ [profile .release-debug ]
293
+ inherits = " release"
294
+ debug = true
295
+
292
296
[patch .crates-io ]
293
297
quick-protobuf = { git = " https://github.com/sigp/quick-protobuf.git" , rev = " 681f413312404ab6e51f0b46f39b0075c6f4ebfd" }
Original file line number Diff line number Diff line change @@ -35,8 +35,10 @@ beacon-node-leveldb = ["store/leveldb"]
35
35
beacon-node-redb = [" store/redb" ]
36
36
# Supports console subscriber for debugging
37
37
console-subscriber = [" console-subscriber/default" ]
38
+ # Turns off jemalloc so that heaptrack may be used to analyse memory usage.
39
+ heaptrack = []
38
40
39
- # Deprecated. This is now enabled by default on non windows targets.
41
+ # Deprecated. This is now enabled by default on non windows targets (unless heaptrack is enabled) .
40
42
jemalloc = []
41
43
42
44
[dependencies ]
@@ -71,12 +73,12 @@ unused_port = { workspace = true }
71
73
validator_client = { workspace = true }
72
74
validator_manager = { path = " ../validator_manager" }
73
75
74
- [target .'cfg(not(target_os = "windows"))' .dependencies ]
75
- malloc_utils = { workspace = true , features = [" jemalloc" ] }
76
-
77
- [target .'cfg(target_os = "windows")' .dependencies ]
76
+ [target .'cfg(any(target_os = "windows", features = "heaptrack"))' .dependencies ]
78
77
malloc_utils = { workspace = true }
79
78
79
+ [target .'cfg(not(any(target_os = "windows", features = "heaptrack")))' .dependencies ]
80
+ malloc_utils = { workspace = true , features = [" jemalloc" ] }
81
+
80
82
[dev-dependencies ]
81
83
beacon_node_fallback = { workspace = true }
82
84
beacon_processor = { workspace = true }
Original file line number Diff line number Diff line change @@ -74,11 +74,11 @@ fn bls_hardware_acceleration() -> bool {
74
74
}
75
75
76
76
fn allocator_name ( ) -> String {
77
- #[ cfg( target_os = "windows" ) ]
77
+ #[ cfg( any ( feature = "heaptrack" , target_os = "windows" ) ) ]
78
78
{
79
79
"system" . to_string ( )
80
80
}
81
- #[ cfg( not( target_os = "windows" ) ) ]
81
+ #[ cfg( not( any ( feature = "heaptrack" , target_os = "windows" ) ) ) ]
82
82
match malloc_utils:: jemalloc:: page_size ( ) {
83
83
Ok ( page_size) => format ! ( "jemalloc ({}K)" , page_size / 1024 ) ,
84
84
Err ( e) => format ! ( "jemalloc (error: {e:?})" ) ,
You can’t perform that action at this time.
0 commit comments