diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-01 11:55:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-01 11:55:52 -0400 |
commit | 1f73897861b8ef0be64ff4b801f8d6f830f683b5 (patch) | |
tree | b4bae8f12e1422113910d8cb00a19d010dc4a52f /scripts/checkstack.pl | |
parent | b904d7131d116900524bd36ec170dcd97846bfd3 (diff) | |
parent | 64ffc9ff424c65adcffe7d590018cc75e2d5d42a (diff) |
Merge branch 'for-35' of git://repo.or.cz/linux-kbuild
* 'for-35' of git://repo.or.cz/linux-kbuild: (81 commits)
kbuild: Revert part of e8d400a to resolve a conflict
kbuild: Fix checking of scm-identifier variable
gconfig: add support to show hidden options that have prompts
menuconfig: add support to show hidden options which have prompts
gconfig: remove show_debug option
gconfig: remove dbg_print_ptype() and dbg_print_stype()
kconfig: fix zconfdump()
kconfig: some small fixes
add random binaries to .gitignore
kbuild: Include gen_initramfs_list.sh and the file list in the .d file
kconfig: recalc symbol value before showing search results
.gitignore: ignore *.lzo files
headerdep: perlcritic warning
scripts/Makefile.lib: Align the output of LZO
kbuild: Generate modules.builtin in make modules_install
Revert "kbuild: specify absolute paths for cscope"
kbuild: Do not unnecessarily regenerate modules.builtin
headers_install: use local file handles
headers_check: fix perl warnings
export_report: fix perl warnings
...
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 14ee68e991dd..1afff6658a7d 100755 --- a/scripts/checkstack.pl +++ b/scripts/checkstack.pl | |||
@@ -21,6 +21,8 @@ | |||
21 | # | 21 | # |
22 | # TODO : Port to all architectures (one regex per arch) | 22 | # TODO : Port to all architectures (one regex per arch) |
23 | 23 | ||
24 | use strict; | ||
25 | |||
24 | # check for arch | 26 | # check for arch |
25 | # | 27 | # |
26 | # $re is used for two matches: | 28 | # $re is used for two matches: |
@@ -104,19 +106,11 @@ my (@stack, $re, $dre, $x, $xs); | |||
104 | } | 106 | } |
105 | } | 107 | } |
106 | 108 | ||
107 | sub bysize($) { | ||
108 | my ($asize, $bsize); | ||
109 | ($asize = $a) =~ s/.*: *(.*)$/$1/; | ||
110 | ($bsize = $b) =~ s/.*: *(.*)$/$1/; | ||
111 | $bsize <=> $asize | ||
112 | } | ||
113 | |||
114 | # | 109 | # |
115 | # main() | 110 | # main() |
116 | # | 111 | # |
117 | my $funcre = qr/^$x* <(.*)>:$/; | 112 | my $funcre = qr/^$x* <(.*)>:$/; |
118 | my $func; | 113 | my ($func, $file, $lastslash); |
119 | my $file, $lastslash; | ||
120 | 114 | ||
121 | while (my $line = <STDIN>) { | 115 | while (my $line = <STDIN>) { |
122 | if ($line =~ m/$funcre/) { | 116 | if ($line =~ m/$funcre/) { |
@@ -173,4 +167,6 @@ while (my $line = <STDIN>) { | |||
173 | } | 167 | } |
174 | } | 168 | } |
175 | 169 | ||
176 | print sort bysize @stack; | 170 | # Sort output by size (last field) |
171 | print sort { ($b =~ /:\t*(\d+)$/)[0] <=> ($a =~ /:\t*(\d+)$/)[0] } @stack; | ||
172 | |||