X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fcheckstack.pl;h=340ad6920511aa08a52f5360c54836c682e2deed;hb=24adf12722b4f2800e5b5f0955d57033f0d0c9e5;hp=663158627155151d60315059a81f1b02d68af697;hpb=19f71153b9be219756c6b2757921433a69b7975c;p=linux-2.6-omap-h63xx.git diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index 66315862715..340ad692051 100755 --- a/scripts/checkstack.pl +++ b/scripts/checkstack.pl @@ -2,7 +2,7 @@ # Check the stack usage of functions # -# Copyright Joern Engel +# Copyright Joern Engel # Inspired by Linus Torvalds # Original idea maybe from Keith Owens # s390 port and big speedup by Arnd Bergmann @@ -13,9 +13,10 @@ # Random bits by Matt Mackall # M68k port by Geert Uytterhoeven and Andreas Schwab # AVR32 port by Haavard Skinnemoen +# PARISC port by Kyle McMartin # # Usage: -# objdump -d vmlinux | stackcheck.pl [arch] +# objdump -d vmlinux | scripts/checkstack.pl [arch] # # TODO : Port to all architectures (one regex per arch) @@ -61,6 +62,8 @@ my (@stack, $re, $x, $xs); } elsif ($arch eq 'mips') { #88003254: 27bdffe0 addiu sp,sp,-32 $re = qr/.*addiu.*sp,sp,-(([0-9]{2}|[3-9])[0-9]{2})/o; + } elsif ($arch eq 'parisc' || $arch eq 'parisc64') { + $re = qr/.*ldo ($x{1,8})\(sp\),sp/o; } elsif ($arch eq 'ppc') { #c00029f4: 94 21 ff 30 stwu r1,-208(r1) $re = qr/.*stwu.*r1,-($x{1,8})\(r1\)/o; @@ -78,6 +81,9 @@ my (@stack, $re, $x, $xs); # pair for larger users. -- PFM. #a00048e0: d4fc40f0 addi.l r15,-240,r15 $re = qr/.*addi\.l.*r15,-(([0-9]{2}|[3-9])[0-9]{2}),r15/o; + } elsif ($arch =~ /^blackfin$/) { + # 0: 00 e8 38 01 LINK 0x4e0; + $re = qr/.*[[:space:]]LINK[[:space:]]*(0x$x{1,8})/o; } else { print("wrong or unknown architecture\n"); exit