Skip to content

Commit

Permalink
Inlined_fns flag
Browse files Browse the repository at this point in the history
  • Loading branch information
d-e-s-o committed Sep 15, 2023
1 parent 535e221 commit 8d19a75
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions src/symbolize/symbolizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ pub struct Builder {
/// This setting implies usage of debug symbols and forces the corresponding
/// flag to `true`.
src_location: bool,
/// Whether to report inlined functions as part of symbolization.
inlined_fns: bool,
/// Whether or not to transparently demangle symbols.
///
/// Demangling happens on a best-effort basis. Currently supported
Expand All @@ -165,12 +167,6 @@ pub struct Builder {
}

impl Builder {
/// Enable/disable line number information.
pub fn enable_src_location(mut self, enable: bool) -> Builder {
self.src_location = enable;
self
}

/// Enable/disable usage of debug symbols.
///
/// That can be useful in cases where ELF symbol information is stripped.
Expand All @@ -179,6 +175,19 @@ impl Builder {
self
}

/// Enable/disable source code location information (line numbers,
/// file names etc.).
pub fn enable_src_location(mut self, enable: bool) -> Builder {
self.src_location = enable;
self
}

/// Enable/disable inlined function reporting.
pub fn enable_inlined_fns(mut self, enable: bool) -> Builder {
self.inlined_fns = enable;
self
}

/// Enable/disable usage of debug symbols.
///
/// That can be useful in cases where ELF symbol information is stripped.
Expand All @@ -192,6 +201,7 @@ impl Builder {
let Builder {
debug_syms,
src_location,
inlined_fns,
demangle,
} = self;
let ksym_cache = KSymCache::new();
Expand All @@ -201,6 +211,7 @@ impl Builder {
ksym_cache,
elf_cache,
src_location,
inlined_fns,
demangle,
}
}
Expand All @@ -209,8 +220,9 @@ impl Builder {
impl Default for Builder {
fn default() -> Self {
Self {
src_location: true,
debug_syms: true,
src_location: true,
inlined_fns: true,
demangle: true,
}
}
Expand All @@ -223,6 +235,7 @@ pub struct Symbolizer {
ksym_cache: KSymCache,
elf_cache: ElfCache,
src_location: bool,
inlined_fns: bool,
demangle: bool,
}

Expand Down

0 comments on commit 8d19a75

Please sign in to comment.