Skip to content

Commit

Permalink
Merge pull request #22 from toddlipcon/master
Browse files Browse the repository at this point in the history
Fixups for stackcollapse-perf
  • Loading branch information
brendangregg committed Jun 17, 2013
2 parents 9e00484 + d99115a commit 24b1224
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions stackcollapse-perf.pl
Expand Up @@ -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: $_";
}
}

Expand Down

0 comments on commit 24b1224

Please sign in to comment.