diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkstack.pl | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index dadfa20ffec0..b34924663ac1 100755 --- a/scripts/checkstack.pl +++ b/scripts/checkstack.pl | |||
@@ -89,11 +89,21 @@ sub bysize($) { | |||
89 | # | 89 | # |
90 | my $funcre = qr/^$x* <(.*)>:$/; | 90 | my $funcre = qr/^$x* <(.*)>:$/; |
91 | my $func; | 91 | my $func; |
92 | my $file, $lastslash; | ||
93 | |||
92 | while (my $line = <STDIN>) { | 94 | while (my $line = <STDIN>) { |
93 | if ($line =~ m/$funcre/) { | 95 | if ($line =~ m/$funcre/) { |
94 | $func = $1; | 96 | $func = $1; |
95 | } | 97 | } |
96 | if ($line =~ m/$re/) { | 98 | elsif ($line =~ m/(.*):\s*file format/) { |
99 | $file = $1; | ||
100 | $file =~ s/\.ko//; | ||
101 | $lastslash = rindex($file, "/"); | ||
102 | if ($lastslash != -1) { | ||
103 | $file = substr($file, $lastslash + 1); | ||
104 | } | ||
105 | } | ||
106 | elsif ($line =~ m/$re/) { | ||
97 | my $size = $1; | 107 | my $size = $1; |
98 | $size = hex($size) if ($size =~ /^0x/); | 108 | $size = hex($size) if ($size =~ /^0x/); |
99 | 109 | ||
@@ -109,7 +119,7 @@ while (my $line = <STDIN>) { | |||
109 | $addr =~ s/ /0/g; | 119 | $addr =~ s/ /0/g; |
110 | $addr = "0x$addr"; | 120 | $addr = "0x$addr"; |
111 | 121 | ||
112 | my $intro = "$addr $func:"; | 122 | my $intro = "$addr $func [$file]:"; |
113 | my $padlen = 56 - length($intro); | 123 | my $padlen = 56 - length($intro); |
114 | while ($padlen > 0) { | 124 | while ($padlen > 0) { |
115 | $intro .= ' '; | 125 | $intro .= ' '; |