Skip to content

Commit

Permalink
support stable rust
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Keao <keao.yang@yahoo.com>
  • Loading branch information
YangKeao committed Dec 15, 2020
1 parent 6e662ed commit 29852fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ default = ["cpp"]
flamegraph = ["inferno"]
protobuf = ["prost", "prost-derive", "prost-build"]
cpp = ["symbolic-demangle/cpp"]
heap = []

[dependencies]
backtrace = "0.3"
Expand Down Expand Up @@ -55,7 +56,7 @@ required-features = ["flamegraph"]

[[example]]
name = "heap_profiler"
required-features = ["protobuf", "flamegraph"]
required-features = ["protobuf", "flamegraph", "heap"]

[[bench]]
name = "collector"
Expand Down
7 changes: 6 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//!};
//! ```
#![feature(const_fn)]
#![cfg_attr(feature = "heap", feature(const_fn))]

/// Define the MAX supported stack depth. TODO: make this variable mutable.
pub const MAX_DEPTH: usize = 32;
Expand All @@ -32,15 +32,20 @@ pub const MAX_THREAD_NAME: usize = 16;
mod collector;
mod error;
mod frames;
#[cfg(feature = "heap")]
mod heap_profiler;

mod profiler;
mod report;
mod timer;

pub use self::collector::{Collector, StackHashCounter};
pub use self::error::{Error, Result};
pub use self::frames::{Frames, Symbol};

#[cfg(feature = "heap")]
pub use self::heap_profiler::{AllocRecorder, HeapProfilerGuard};

pub use self::profiler::ProfilerGuard;
pub use self::report::{Report, ReportBuilder};

Expand Down

0 comments on commit 29852fb

Please sign in to comment.