commit 2ad9cb74192cfe20202dc961ca256c3d6062cb3c
parent c536e6aef5aed21cd61892218be2e79e7cb7f8f1
Author: Brendan Gregg <brendan.d.gregg@gmail.com>
Date: Thu, 15 Dec 2011 18:41:58 -0800
Merge pull request #1 from davepacheco/master
add support for frames with whitespace
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/flamegraph.pl b/flamegraph.pl
@@ -47,6 +47,7 @@
#
# CDDL HEADER END
#
+# 15-Dec-2011 Dave Pacheco Support for frames with whitespace.
# 10-Sep-2011 Brendan Gregg Created this.
use strict;
@@ -170,7 +171,7 @@ my $last = "";
my $time = 0;
foreach (sort @Data) {
chomp;
- my ($stack, $samples) = split ' ';
+ my ($stack, $samples) = (/^(.*)\s+(\d+)$/);
$stack = ",$stack";
next unless defined $samples;
flow($last, $stack, $time);