Skip to content

Commit

Permalink
Merge pull request #1 from davepacheco/master
Browse files Browse the repository at this point in the history
add support for frames with whitespace
  • Loading branch information
brendangregg committed Dec 16, 2011
2 parents c536e6a + a776fbb commit 2ad9cb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flamegraph.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -170,7 +171,7 @@ sub flow {
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);
Expand Down

0 comments on commit 2ad9cb7

Please sign in to comment.