Skip to content

Commit

Permalink
Strip java related things and handle inlined stacks produced by dtrace.
Browse files Browse the repository at this point in the history
  • Loading branch information
normanmaurer committed Aug 17, 2017
1 parent 6ba0593 commit 6ada7cf
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion stackcollapse.pl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,20 @@ sub remember_stack {
$frame =~ s/(::.*)[(<].*/$1/;

$frame = "-" if $frame eq "";
unshift @stack, $frame;

my @inline;
for (split /\->/, $frame) {
my $func = $_;

# Strip out L and ; included in java stacks
$func =~ tr/\;/:/;
$func =~ s/^L//;
$func .= "_[i]" if scalar(@inline) > 0; #inlined

push @inline, $func;
}

unshift @stack, @inline;
}

foreach my $k (sort { $a cmp $b } keys %collapsed) {
Expand Down

0 comments on commit 6ada7cf

Please sign in to comment.