File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ default = ["cpp"]
14
14
flamegraph = [" inferno" ]
15
15
protobuf = [" prost" , " prost-derive" , " prost-build" ]
16
16
cpp = [" symbolic-demangle/cpp" ]
17
+ heap = []
17
18
18
19
[dependencies ]
19
20
backtrace = " 0.3"
@@ -55,7 +56,7 @@ required-features = ["flamegraph"]
55
56
56
57
[[example ]]
57
58
name = " heap_profiler"
58
- required-features = [" protobuf" , " flamegraph" ]
59
+ required-features = [" protobuf" , " flamegraph" , " heap " ]
59
60
60
61
[[bench ]]
61
62
name = " collector"
Original file line number Diff line number Diff line change 21
21
//!};
22
22
//! ```
23
23
24
- #![ feature( const_fn) ]
24
+ #![ cfg_attr ( feature = "heap" , feature ( const_fn) ) ]
25
25
26
26
/// Define the MAX supported stack depth. TODO: make this variable mutable.
27
27
pub const MAX_DEPTH : usize = 32 ;
@@ -32,15 +32,20 @@ pub const MAX_THREAD_NAME: usize = 16;
32
32
mod collector;
33
33
mod error;
34
34
mod frames;
35
+ #[ cfg( feature = "heap" ) ]
35
36
mod heap_profiler;
37
+
36
38
mod profiler;
37
39
mod report;
38
40
mod timer;
39
41
40
42
pub use self :: collector:: { Collector , StackHashCounter } ;
41
43
pub use self :: error:: { Error , Result } ;
42
44
pub use self :: frames:: { Frames , Symbol } ;
45
+
46
+ #[ cfg( feature = "heap" ) ]
43
47
pub use self :: heap_profiler:: { AllocRecorder , HeapProfilerGuard } ;
48
+
44
49
pub use self :: profiler:: ProfilerGuard ;
45
50
pub use self :: report:: { Report , ReportBuilder } ;
46
51
You can’t perform that action at this time.
0 commit comments