blob: 287cf468d98a01fd6ce13553878d2ca19dda0805 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/usr/bin/perl -w
open IN, "<taipan.lst" or die $!;
while(<IN>) {
(/^([0-9A-F]{6})/) && (eval "\$addr = 0x$1");
if(/\.proc\s+_(\w+)/) {
$proc = $1;
$start{$proc} = $addr;
} elsif(/\.endproc/) {
$end{$proc} = $addr - 1;
$proc = "";
}
}
for(sort keys %start) {
$len{$_} = $end{$_} - $start{$_} + 1;
}
for(sort { $len{$a} <=> $len{$b} } keys %len) {
printf "% 32s % d\n", $_, $len{$_};
$total += $len{$_};
}
printf "% 32s % d\n", "Total:", $total;
|