pub struct SymbolizerBuilder<'a> { /* private fields */ }Expand description
Configures a Symbolizer.
Implementations§
Source§impl<'a> SymbolizerBuilder<'a>
impl<'a> SymbolizerBuilder<'a>
Sourcepub fn for_modules(modules: &'a [ModuleRecord]) -> Self
pub fn for_modules(modules: &'a [ModuleRecord]) -> Self
Configure symbolization for a module list.
Sourcepub fn disable_perf_maps(self) -> Self
pub fn disable_perf_maps(self) -> Self
Disable Python perf-map lookup.
Sourcepub fn perf_maps_for(self, processes: impl IntoIterator<Item = Pid>) -> Self
pub fn perf_maps_for(self, processes: impl IntoIterator<Item = Pid>) -> Self
Restrict Python perf-map lookup to selected processes.
Sourcepub fn perf_map_dir(self, directory: impl Into<PathBuf>) -> Self
pub fn perf_map_dir(self, directory: impl Into<PathBuf>) -> Self
Read preserved perf-PID.map files from directory.
Sourcepub fn native<S>(self, factory: impl FnMut(Pid) -> S + 'static) -> Selfwhere
S: NativeSymbolizer + 'static,
pub fn native<S>(self, factory: impl FnMut(Pid) -> S + 'static) -> Selfwhere
S: NativeSymbolizer + 'static,
Use a caller-supplied native symbolizer factory.
The factory runs lazily, at most once per process id, when a resolve call first needs native symbols for that process.
Sourcepub fn try_native<S, E>(
self,
factory: impl FnMut(Pid) -> Result<S, E> + 'static,
) -> Self
pub fn try_native<S, E>( self, factory: impl FnMut(Pid) -> Result<S, E> + 'static, ) -> Self
Use a caller-supplied native symbolizer factory that may fail.
The factory runs lazily and its first successful result is retained per process id. A factory error is returned by that resolve call; a later resolve may retry construction.
Sourcepub fn kernel_symbols(self, source: KernelSymbolSource) -> Self
pub fn kernel_symbols(self, source: KernelSymbolSource) -> Self
Select the kernel symbol source.
A preserved file should contain the same address-bearing kallsyms
data that was visible on the recording host. This avoids accidentally
resolving a cross-host profile against the analysis host’s kernel.
Sourcepub fn stack_cache(self, stack_cache: StackCache) -> Self
pub fn stack_cache(self, stack_cache: StackCache) -> Self
Select the owner of resolved-stack caching.
Sourcepub fn build(self) -> Result<Symbolizer>
pub fn build(self) -> Result<Symbolizer>
Build the configured symbolizer.
§Errors
Returns an invalid-input error for duplicate module IDs, or an I/O error when an explicit kernel symbol file cannot be loaded.
Source§impl SymbolizerBuilder<'static>
impl SymbolizerBuilder<'static>
Sourcepub fn from_modules(modules: Vec<ModuleRecord>) -> Self
pub fn from_modules(modules: Vec<ModuleRecord>) -> Self
Configure symbolization by transferring ownership of a module table.
This avoids copying the table when it was assembled by the caller.