tools/footprint/codemap.pl
author Boris Zbarsky <bzbarsky@mit.edu>
Mon, 11 May 2009 22:04:58 -0400
changeset 28217 de33f2e0b22fac8f1dfa8ba76aa32266735001f2
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rw-r--r--
Bug 480452. Make {ib} splits behave the same way with regard to margins, borders, and padding as inline frames that just have a line-break happening inside them do. r+sr=dbaron

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