Skip to content

Commit

Permalink
Use a semicolon to separate frames
Browse files Browse the repository at this point in the history
Use a semicolon instead of a comma to separate frames in the
flamegraph input.  Commas can appear in demangled C++ function
names (e.g. foo(int, int) ) so using commas to separate frames
can confuse the parser.
  • Loading branch information
Ryan Stone committed Jun 14, 2012
1 parent 2672d89 commit 02b07ad
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions flamegraph.pl
Expand Up @@ -135,8 +135,8 @@ sub color {

sub flow {
my ($a, $b, $v) = @_;
my @A = split ",", $a;
my @B = split ",", $b;
my @A = split ";", $a;
my @B = split ";", $b;

my $len_a = $#A;
my $len_b = $#B;
Expand Down
2 changes: 1 addition & 1 deletion stackcollapse-perf.pl
Expand Up @@ -68,7 +68,7 @@ sub remember_stack {
chomp;

if (m/^$/) {
remember_stack(join(",", @stack), 1) if @stack;
remember_stack(join(";", @stack), 1) if @stack;
undef @stack;
next;
}
Expand Down
2 changes: 1 addition & 1 deletion stackcollapse-stap.pl
Expand Up @@ -64,7 +64,7 @@ sub remember_stack {
chomp;

if (m/^\s*(\d+)+$/) {
remember_stack(join(",", @stack), $1);
remember_stack(join(";", @stack), $1);
@stack = ();
next;
}
Expand Down
2 changes: 1 addition & 1 deletion stackcollapse.pl
Expand Up @@ -66,7 +66,7 @@ sub remember_stack {
chomp;

if (m/^\s*(\d+)+$/) {
remember_stack(join(",", @stack), $1);
remember_stack(join(";", @stack), $1);
@stack = ();
next;
}
Expand Down

0 comments on commit 02b07ad

Please sign in to comment.