From f579f9812b3b071a6e7df03f04ea9640876f7d63 Mon Sep 17 00:00:00 2001 From: Ariel Ben-Yehuda Date: Thu, 5 Dec 2024 12:45:34 +0200 Subject: [PATCH] Update docs Co-authored-by: Motoyuki Kimura --- spellcheck.dic | 3 ++- tokio/src/runtime/dump.rs | 22 +++++++--------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/spellcheck.dic b/spellcheck.dic index aa309f5e557..ad73ea17bdc 100644 --- a/spellcheck.dic +++ b/spellcheck.dic @@ -1,4 +1,4 @@ -297 +298 & + < @@ -31,6 +31,7 @@ 50ms 8MB ABI +accessors adaptor adaptors Adaptors diff --git a/tokio/src/runtime/dump.rs b/tokio/src/runtime/dump.rs index 30e7b408bac..d262f3987cc 100644 --- a/tokio/src/runtime/dump.rs +++ b/tokio/src/runtime/dump.rs @@ -41,12 +41,9 @@ struct Address(*mut std::ffi::c_void); unsafe impl Send for Address {} unsafe impl Sync for Address {} -/// A backtrace symbol. This is similar to [`backtrace::BacktraceSymbol`], -/// but is a separate struct to avoid public dependency issues. +/// A backtrace symbol. /// -/// This struct is guaranteed to be pure data and operations involving -/// it will not call platform functions that take an unpredictable amount -/// of time to finish. +/// This struct provides accessors for backtrace symbols, similar to [`backtrace::BacktraceSymbol`]. #[derive(Clone, Debug)] pub struct BacktraceSymbol { name: Option>, @@ -106,12 +103,9 @@ impl BacktraceSymbol { } } -/// A backtrace frame. This is similar to [`backtrace::BacktraceFrame`], -/// but is a separate struct to avoid public dependency issues. +/// A backtrace frame. /// -/// This struct is guaranteed to be pure data and operations involving -/// it will not call platform functions that take an unpredictable amount -/// of time to finish. +/// This struct represents one stack frame in a captured backtrace, similar to [`backtrace::BacktraceFrame`]. #[derive(Clone, Debug)] pub struct BacktraceFrame { ip: Address, @@ -154,12 +148,9 @@ impl BacktraceFrame { } } -/// A backtrace. This is similar to [`backtrace::Backtrace`], -/// but is a separate struct to avoid public dependency issues. +/// A captured backtrace. /// -/// This struct is guaranteed to be pure data and operations involving -/// it will not call platform functions that take an unpredictable amount -/// of time to finish. +/// This struct provides access to each backtrace frame, similar to [`backtrace::Backtrace`]. #[derive(Clone, Debug)] pub struct Backtrace { frames: Box<[BacktraceFrame]>, @@ -176,6 +167,7 @@ impl Backtrace { /// An execution trace of a task's last poll. /// ///
+/// /// Resolving a backtrace, either via the [`Display`][std::fmt::Display] impl or via /// [`resolve_backtraces`][Trace::resolve_backtraces], parses debuginfo, which is /// possibly a CPU-expensive operation that can take a platform-specific but