pub struct StackFrameInfo {
pub pid: usize,
pub cmd: String,
pub address: u64,
pub object_path: Option<PathBuf>,
pub symbol: Option<String>,
pub source: Option<String>,
pub cpu_id: Option<u32>,
pub ns: Option<u64>,
}Expand description
Struct to contain information about a userspace/kernel stack frame
Represents a single frame in a stack trace with information about its memory address, associated binary, symbol name, and source location. Used for generating human-readable stack traces in flamegraphs.
Fields§
§pid: usize§cmd: String§address: u64Physical memory address
object_path: Option<PathBuf>Shared Object / Module
symbol: Option<String>Source file and location
source: Option<String>Source file and location
cpu_id: Option<u32>§ns: Option<u64>namespace
Implementations§
Source§impl StackFrameInfo
impl StackFrameInfo
Sourcepub fn process_only(meta: &StackInfo) -> Self
pub fn process_only(meta: &StackInfo) -> Self
Creates an StackFrameInfo placeholder for process name
pub fn new(address: u64, object_path: Option<PathBuf>) -> Self
Sourcepub fn object_path(&self) -> Option<&Path>
pub fn object_path(&self) -> Option<&Path>
Executable or library path. This can be empty if there is no associated object on the filesystem
pub fn fmt(&self) -> String
pub fn fmt_symbol(&self) -> String
pub fn fmt_object(&self) -> &str
pub fn fmt_source(&self) -> String
Trait Implementations§
Source§impl Clone for StackFrameInfo
impl Clone for StackFrameInfo
Source§fn clone(&self) -> StackFrameInfo
fn clone(&self) -> StackFrameInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StackFrameInfo
impl Debug for StackFrameInfo
Source§impl Default for StackFrameInfo
impl Default for StackFrameInfo
Source§fn default() -> StackFrameInfo
fn default() -> StackFrameInfo
Returns the “default value” for a type. Read more
Source§impl PartialEq for StackFrameInfo
impl PartialEq for StackFrameInfo
impl Eq for StackFrameInfo
impl StructuralPartialEq for StackFrameInfo
Auto Trait Implementations§
impl Freeze for StackFrameInfo
impl RefUnwindSafe for StackFrameInfo
impl Send for StackFrameInfo
impl Sync for StackFrameInfo
impl Unpin for StackFrameInfo
impl UnwindSafe for StackFrameInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.