Struct profiler_get_symbols::CompactSymbolTable
source · [−]Expand description
A “compact” representation of a symbol table.
This is a legacy concept used by the Firefox profiler and kept for
compatibility purposes. It’s called SymbolTableAsTuple
in the profiler code.
The string for the address addrs[i]
is
std::str::from_utf8(buffer[index[i] as usize .. index[i + 1] as usize])
Fields
addr: Vec<u32>
A sorted array of symbol addresses, as library-relative offsets in bytes, in ascending order.
index: Vec<u32>
Contains positions into buffer
. For every address addr[i]
,
index[i]
is the position where the string for that address starts in
the buffer. Also contains one extra index at the end which is buffer.len()
.
index.len() == addr.len() + 1
buffer: Vec<u8>
A buffer of bytes that contains all strings from this symbol table, in the order of the addresses they correspond to, in utf-8 encoded form, all concatenated together.
Trait Implementations
sourceimpl SymbolicationResult for CompactSymbolTable
impl SymbolicationResult for CompactSymbolTable
sourcefn from_full_map<T: Deref<Target = str>>(entries: Vec<(u32, T)>) -> Self
fn from_full_map<T: Deref<Target = str>>(entries: Vec<(u32, T)>) -> Self
Create a SymbolicationResult
object based on a full symbol map.
Only called if result_kind
is SymbolicationResultKind::AllSymbols
. Read more
sourcefn for_addresses(_addresses: &[u32]) -> Self
fn for_addresses(_addresses: &[u32]) -> Self
Create a SymbolicationResult
object based on a set of addresses.
Only called if result_kind
is SymbolicationResultKind::SymbolsForAddresses
.
The data for each address will be supplied by subsequent calls to add_address_symbol
and potentially add_address_debug_info
. Read more
sourcefn add_address_symbol(
&mut self,
_address: u32,
_symbol_address: u32,
_symbol_name: &str,
_function_size: Option<u32>
)
fn add_address_symbol(
&mut self,
_address: u32,
_symbol_address: u32,
_symbol_name: &str,
_function_size: Option<u32>
)
Called to supply the symbol name for a symbol.
Only called if result_kind
is SymbolicationResultKind::SymbolsForAddresses
, and
only on objects constructed by a call to for_addresses
.
address
is the address that the consumer wants to look up, and may fall anywhere
inside a function. symbol_address
is the closest (<= address) symbol address. Read more
sourcefn add_address_debug_info(&mut self, _address: u32, _info: AddressDebugInfo)
fn add_address_debug_info(&mut self, _address: u32, _info: AddressDebugInfo)
Called to supply debug info for the address.
Only called if result_kind
is SymbolicationResultKind::SymbolsForAddresses { with_debug_info: true }
. Read more
sourcefn set_total_symbol_count(&mut self, _total_symbol_count: u32)
fn set_total_symbol_count(&mut self, _total_symbol_count: u32)
Supplies the total number of symbols in this binary.
Only called if result_kind
is SymbolicationResultKind::SymbolsForAddresses
, and
only on objects constructed by a call to for_addresses
. Read more
Auto Trait Implementations
impl RefUnwindSafe for CompactSymbolTable
impl Send for CompactSymbolTable
impl Sync for CompactSymbolTable
impl Unpin for CompactSymbolTable
impl UnwindSafe for CompactSymbolTable
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more