aboutsummaryrefslogtreecommitdiff
path: root/crates/profile/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/profile/src')
-rw-r--r--crates/profile/src/lib.rs15
1 files changed, 0 insertions, 15 deletions
diff --git a/crates/profile/src/lib.rs b/crates/profile/src/lib.rs
index ab19271c7..aa6ccc36c 100644
--- a/crates/profile/src/lib.rs
+++ b/crates/profile/src/lib.rs
@@ -15,21 +15,6 @@ pub use crate::{
15 stop_watch::{StopWatch, StopWatchSpan}, 15 stop_watch::{StopWatch, StopWatchSpan},
16}; 16};
17 17
18/// Prints backtrace to stderr, useful for debugging.
19#[cfg(feature = "backtrace")]
20pub fn print_backtrace() {
21 let bt = backtrace::Backtrace::new();
22 eprintln!("{:?}", bt);
23}
24#[cfg(not(feature = "backtrace"))]
25pub fn print_backtrace() {
26 eprintln!(
27 r#"enable the backtrace feature:
28 profile = {{ path = "../profile", features = [ "backtrace"] }}
29"#
30 );
31}
32
33thread_local!(static IN_SCOPE: RefCell<bool> = RefCell::new(false)); 18thread_local!(static IN_SCOPE: RefCell<bool> = RefCell::new(false));
34 19
35/// Allows to check if the current code is withing some dynamic scope, can be 20/// Allows to check if the current code is withing some dynamic scope, can be