flamegraph

Fork of flamegraph without J***S*****.
git clone git://git.laack.co/flamegraph.git
Log | Files | Refs | README

commit e06f5fe5981f1d09330835b2805225b47ee03721
parent 6ba0593e4bd6358f74f8e0087f42e8f917d81df4
Author: Brendan Gregg <brendan.d.gregg@gmail.com>
Date:   Thu, 17 Aug 2017 11:40:53 -0700

Merge pull request #143 from normanmaurer/osx

Strip java related things and handle inlined stacks produced by dtrace.
Diffstat:
Mstackcollapse.pl | 15++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/stackcollapse.pl b/stackcollapse.pl @@ -88,7 +88,20 @@ foreach (<>) { $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) {