X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fcheckstack.pl;h=b34924663ac1f749d385efe70d09e226aff6bf45;hb=ce38cac48209d270d07fd6d1a8e94446b37abcd5;hp=dadfa20ffec0106ecea591e607a4ca3f722f3e27;hpb=59f720eb5a4337b2c4fc0b4c6cfd9c144e492aa8;p=linux-2.6-omap-h63xx.git diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index dadfa20ffec..b34924663ac 100755 --- a/scripts/checkstack.pl +++ b/scripts/checkstack.pl @@ -89,11 +89,21 @@ sub bysize($) { # my $funcre = qr/^$x* <(.*)>:$/; my $func; +my $file, $lastslash; + while (my $line = ) { if ($line =~ m/$funcre/) { $func = $1; } - if ($line =~ m/$re/) { + elsif ($line =~ m/(.*):\s*file format/) { + $file = $1; + $file =~ s/\.ko//; + $lastslash = rindex($file, "/"); + if ($lastslash != -1) { + $file = substr($file, $lastslash + 1); + } + } + elsif ($line =~ m/$re/) { my $size = $1; $size = hex($size) if ($size =~ /^0x/); @@ -109,7 +119,7 @@ while (my $line = ) { $addr =~ s/ /0/g; $addr = "0x$addr"; - my $intro = "$addr $func:"; + my $intro = "$addr $func [$file]:"; my $padlen = 56 - length($intro); while ($padlen > 0) { $intro .= ' ';