| Age | Commit message (Collapse) | Author |
|
Add support for x86_64 arch. to 'make checkstack' (checkstack.pl).
Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
Acked-by: Jrn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
- fix documentation
- use $(src) in Makefile (fixes cross-compilation)
Both spottet by Geert Uytterhoeven
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Add m68k support to checkstack.pl
Regular expression combination by Andres Schwab
Signed-off-by: <geert@linux-m68k.org>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
- "\<" and "\>" can be safely replaced with "<" and ">"
- "$var =~ /^string$/" is better written "$var eq 'string'"
- $i is better written without the double quotes
- it's not safe to use for without "my"ing the iteration variable
- "print foreach @array" is better written "print @array"
- declare variables
- ".*" is useless at the end of a regexp
- "$a[@a] = $foo" is a rather obfuscated syntax for "push @a, $foo"...
let's not opencoding language basic operators...
- ignoring return value from a regexp is very bad: this can results in
working on previous value of $1, $2, ...
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
On i386, stack usually grows with "sub $0x8,%esp" and shrinks with
"add $0x8,%esp" respectively. In some cases, though, stack grows with
"add $0xffffff80,%esp" and shrinks with "sub $0xffffff80,%esp".
Obviously, we don't want to miss those cases.
Since in either case add and sub seem to be balanced and contain the
same parameter, we don't need a second regex. We simply accept hex
numbers of up to 8 digits and treat them as negative numbers when the
sub appears to be a little too high.
...or so I thought. But another day of testing proved me wrong again.
Some functions do stuff like "sub $0x10,%esp", ..., "add $0x20,%esp".
In other words, add and sub are *NOT* balanced. Manual inspection
showed that 0x20 is a more realistic number, so I accept either
variant, just in case. We pay for this with a bunch of duplicates in
our output, but that beats missing some stack hogs.
In the long run, this script has to be replaced by gcc options,
really. Looking at the result and guessing back is such a stupid
idea.
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
|
|
Jorn Engel <joern@wohnheim.fh-wedel.de>
Adds a `make checkstack' target. This disassembles and parses vmlinux and
*.ko, generating a sorted list of stack hogs, eg:
0xc0100663 huft_build: 1456
0xc01022d3 huft_build: 1456
0xc0103127 inflate_dynamic: 1328
0xc0101487 inflate_dynamic: 1324
0xc010131f inflate_fixed: 1168
0xc0102fb7 inflate_fixed: 1168
0x00000003 sha512_transform: 984
0xc024aee3 Vpd: 952
0x00000003 twofish_setkey: 804
0x000060c3 isd200_action: 792
0x0000e6cb nfsd4_proc_compound: 760
0xc0249087 SkPnmiGetStruct: 712
....
Supported architectures are alleged to be arm, x86, ia64, mips, mips64, ppc,
ppc64 and s390x.
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|