Permalink
Browse files

Merge pull request #22 from toddlipcon/master

Fixups for stackcollapse-perf
  • Loading branch information...
2 parents 9e00484 + d99115a commit 24b1224751f8596ffcb5d0c129493891d1ada109 @brendangregg committed Jun 17, 2013
Showing with 8 additions and 4 deletions.
  1. +8 −4 stackcollapse-perf.pl
View
@@ -75,13 +75,17 @@ sub remember_stack {
# Note the details skipped below, and customize as desired
- next if m/:.*:/; # skip summary lines
+ if (m/:.*:\s$/) {
+ # skip summary lines
+ next;
+ }
- if (/^\s*\w+ (\w+) (\S+)/) {
+ if (/^\s*\w+\s*(.+) (\S+)/) {
my ($func, $mod) = ($1, $2);
- next if $func =~ /\(/; # skip process names
- next unless $mod =~ /kernel/; # skip non-kernel
+ next if $func =~ /^\(/; # skip process names
unshift @stack, $func;
+ } else {
+ warn "Unrecognized line: $_";
}
}

0 comments on commit 24b1224

Please sign in to comment.