Skip to content

Commit

Permalink
hide perf_signal_handler frames on macOS (#207)
Browse files Browse the repository at this point in the history
Signed-off-by: kadiwa <kalle.wachsmuth@gmail.com>
  • Loading branch information
kadiwa4 authored Apr 18, 2023
1 parent 7f64ddd commit a48585a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/frames.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,13 @@ impl From<UnresolvedFrames> for Frames {
symbols.push(symbol);
});

if symbols
.iter()
.any(|symbol| symbol.name() == "perf_signal_handler")
{
if symbols.iter().any(|symbol| {
// macOS prepends an underscore even with `#[no_mangle]`
matches!(
&*symbol.name(),
"perf_signal_handler" | "_perf_signal_handler"
)
}) {
// ignore frame itself and its next one
frame_iter.next();
continue;
Expand Down

0 comments on commit a48585a

Please sign in to comment.