Skip to content

Commit

Permalink
stackcollapse-gdb: Do not forget the last sample
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Corona authored and brendangregg committed Oct 11, 2015
1 parent bbc6891 commit 385950d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stackcollapse-gdb.pl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@
}
}

if(!($current eq "")) {
$stacks{$current} += 1;
$current = "";
}

foreach my $k (sort { $a cmp $b } keys %stacks) {
print "$k $stacks{$k}\n";
}

0 comments on commit 385950d

Please sign in to comment.