StacktraceObserver speedup using unresolved backtrace (#1002)

We don't use the symbols anyway, and it makes the call *way* faster.
This commit is contained in:
Paul Walker 2023-01-18 12:51:42 +00:00 committed by GitHub
parent 3c8a00bc42
commit 333a51aeaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ use crate::{
/// ([`Debug`] is currently used for dev purposes, symbols hash will be used eventually) /// ([`Debug`] is currently used for dev purposes, symbols hash will be used eventually)
#[must_use] #[must_use]
pub fn collect_backtrace() -> u64 { pub fn collect_backtrace() -> u64 {
let b = Backtrace::new(); let b = Backtrace::new_unresolved();
if b.frames().is_empty() { if b.frames().is_empty() {
return 0; return 0;
} }