tools/footprint/codemap.pl
author Mitchell Field <mitchell.field@live.com.au>
Sat, 05 Jun 2010 21:18:12 -0400
changeset 43144 2d90590dabe63ad9d6323376e6a1138add81e1cb
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rw-r--r--
Bug 542222 - Reduce recursion in netwerk makefiles.

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;
}