git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
deb-pkg: Fix building outside of source tree (O=...).
[pandora-kernel.git]
/
scripts
/
checkstack.pl
diff --git
a/scripts/checkstack.pl
b/scripts/checkstack.pl
index
14ee68e
..
1afff66
100755
(executable)
--- a/
scripts/checkstack.pl
+++ b/
scripts/checkstack.pl
@@
-21,6
+21,8
@@
#
# TODO : Port to all architectures (one regex per arch)
#
# TODO : Port to all architectures (one regex per arch)
+use strict;
+
# check for arch
#
# $re is used for two matches:
# 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* <(.*)>:$/;
#
# main()
#
my $funcre = qr/^$x* <(.*)>:$/;
-my $func;
-my $file, $lastslash;
+my ($func, $file, $lastslash);
while (my $line = <STDIN>) {
if ($line =~ m/$funcre/) {
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;
+