flamegraph

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

commit 208c495509ea4f6648476e48dcd743e1bde90de1
parent a96184c6939f8c6281fcd7285b54fba80555ac74
Author: Brendan Gregg <brendan.d.gregg@gmail.com>
Date:   Tue,  7 Nov 2023 11:26:34 +1100

Merge pull request #147 from nitsanw/java-frame-annotation-fix

Correctly detect java in -tid, don't double annotate.
Diffstat:
Mstackcollapse-perf.pl | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/stackcollapse-perf.pl b/stackcollapse-perf.pl @@ -356,7 +356,7 @@ while (defined($_ = <>)) { # fall through to $tidy_java } - if ($tidy_java and $pname eq "java") { + if ($tidy_java and $pname =~ m/^java/) { # along with $tidy_generic, converts the following: # Lorg/mozilla/javascript/ContextFactory;.call(Lorg/mozilla/javascript/ContextAction;)Ljava/lang/Object; # Lorg/mozilla/javascript/ContextFactory;.call(Lorg/mozilla/javascript/C @@ -379,11 +379,11 @@ while (defined($_ = <>)) { # detect jit from the module name; eg: # 7f722d142778 Ljava/io/PrintStream;::print (/tmp/perf-19982.map) if (scalar(@inline) > 0) { - $func .= "_[i]"; # inlined + $func .= "_[i]" unless $func =~ m/.*.\_\[i\]/; # inlined } elsif ($annotate_kernel == 1 && $mod =~ m/(^\[|vmlinux$)/ && $mod !~ /unknown/) { $func .= "_[k]"; # kernel } elsif ($annotate_jit == 1 && $mod =~ m:/tmp/perf-\d+\.map:) { - $func .= "_[j]"; # jitted + $func .= "_[j]" unless $func =~ m/.*.\_\[j\]/; # jitted } #