tools/footprint/codemap.pl
author Jeff Walden <jwalden@mit.edu>
Fri, 26 Mar 2010 21:53:40 -0700
changeset 40379 ade01a37624aaaa9704580e0ae80c9d90aca9b61
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rw-r--r--
Merge.

while (<>) {
    chomp;
    if (/^mozilla.exe/) {
        $start = 1;
    }
    if ($start) {
        chomp;
        @fields = split(/  */);
        $bytes = $fields[2];
        $bytes =~ s/,//g;
        $codesize += $bytes;
    }
}
printf "%8.2f K codesize\n", toK($codesize);

sub toK()
{
    return $_[0] / 1024;
}