Skip to content

Commit

Permalink
undef $samples2 error with --reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
brendangregg committed Oct 29, 2014
1 parent 76f475e commit fff2ad0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flamegraph.pl
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,10 @@ sub flow {
if ($stack =~ /^(.*)\s+?(\d+(?:\.\d*)?)$/) {
$samples2 = $samples;
($stack, $samples) = $stack =~ (/^(.*)\s+?(\d+(?:\.\d*)?)$/);
unshift @Data, join(";", reverse split(";", $stack)) . " $samples $samples2";
} else {
unshift @Data, join(";", reverse split(";", $stack)) . " $samples";
}
unshift @Data, join(";", reverse split(";", $stack)) . " $samples $samples2";
} else {
unshift @Data, $line;
}
Expand Down

0 comments on commit fff2ad0

Please sign in to comment.