flamegraph

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

commit 87fca3856fc47dd935cab11664a391ba4b5a1c2a
parent 7d1a5571c1137e9ac66e71b1e60c29e8a0206b31
Author: Brendan Gregg <brendan.d.gregg@gmail.com>
Date:   Sun, 29 Mar 2015 14:42:07 -0700

code style

Diffstat:
Mstackcollapse-perf.pl | 17+++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/stackcollapse-perf.pl b/stackcollapse-perf.pl @@ -72,12 +72,12 @@ my $the_pname; my $show_inline = 0; my $show_context = 0; -GetOptions( 'inline' => \$show_inline, - 'context' => \$show_context) +GetOptions('inline' => \$show_inline, + 'context' => \$show_context) or die("Error in command line arguments\n"); foreach (<>) { - if(/^# cmdline.+\.\.(\S+)( .+|$)/) { + if (/^# cmdline.+\.\.(\S+)( .+|$)/) { $the_pname = $1; } next if m/^#/; @@ -120,11 +120,12 @@ foreach (<>) { if ($one_item eq "") { $one_item = $_; } else { - if ($show_context == 1) { - unshift @fullfunc, $one_item . ":$_"; - } else { - unshift @fullfunc, $one_item; - } + if ($show_context == 1) { + unshift @fullfunc, + $one_item . ":$_"; + } else { + unshift @fullfunc, $one_item; + } $one_item = ""; } }