diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2010-07-05 15:46:08 +0900 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2010-07-05 15:46:08 +0900 |
| commit | 285eba57db7bd7d7c3c5929fb8621fdcaaea1b00 (patch) | |
| tree | a9e7f0563cef296b24c53b20dbb388ec5c210172 /scripts/checkstack.pl | |
| parent | 1c14e6cecb1811543b1016f27e5d308fbea8c08a (diff) | |
| parent | 815c4163b6c8ebf8152f42b0a5fd015cfdcedc78 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
include/linux/serial_sci.h
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'scripts/checkstack.pl')
| -rwxr-xr-x | scripts/checkstack.pl | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index 14ee68e991d..1afff6658a7 100755 --- a/scripts/checkstack.pl +++ b/scripts/checkstack.pl @@ -21,6 +21,8 @@ # # TODO : Port to all architectures (one regex per arch) +use strict; + # check for arch # # $re is used for two matches: @@ -104,19 +106,11 @@ my (@stack, $re, $dre, $x, $xs); } } -sub bysize($) { - my ($asize, $bsize); - ($asize = $a) =~ s/.*: *(.*)$/$1/; - ($bsize = $b) =~ s/.*: *(.*)$/$1/; - $bsize <=> $asize -} - # # main() # my $funcre = qr/^$x* <(.*)>:$/; -my $func; -my $file, $lastslash; +my ($func, $file, $lastslash); while (my $line = <STDIN>) { if ($line =~ m/$funcre/) { @@ -173,4 +167,6 @@ while (my $line = <STDIN>) { } } -print sort bysize @stack; +# Sort output by size (last field) +print sort { ($b =~ /:\t*(\d+)$/)[0] <=> ($a =~ /:\t*(\d+)$/)[0] } @stack; + |
