pub struct ThreadSample {
pub os_tid: u64,
pub stack_pointer: u64,
pub instruction_pointer: u64,
pub frame_pointer: u64,
pub link_register: Option<u64>,
pub stack_bytes: Vec<u8>,
pub truncated: bool,
pub kind: CaptureKind,
pub frames: Vec<u64>,
}Expand description
One thread’s captured state.
Fields§
§os_tid: u64OS thread id.
stack_pointer: u64Stack pointer at capture time.
instruction_pointer: u64Instruction pointer at capture time.
frame_pointer: u64Frame pointer at capture time.
link_register: Option<u64>Link register, on architectures that have one (aarch64).
Load-bearing there: a leaf frame’s return address lives in LR rather
than on the stack, so unwinding without it loses the first frame.
None on x86_64, which has no such register.
stack_bytes: Vec<u8>Bytes copied from the stack, starting at stack_pointer.
truncated: boolTrue when the stack was longer than MAX_STACK_BYTES, so the copy is
a prefix. A consumer must not read a truncated capture as a complete
one.
kind: CaptureKindWhat stage this sample is at.
frames: Vec<u64>Return addresses, once unwinding has run. Empty until then — check
Snapshot::frames_resolved rather than inferring from emptiness,
since a thread with an unwalkable stack also yields none.
Trait Implementations§
Source§impl Clone for ThreadSample
impl Clone for ThreadSample
Source§fn clone(&self) -> ThreadSample
fn clone(&self) -> ThreadSample
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more