12 Nov, 2016

1 commit

  • Fix piping output to a program which quickly exits (read: head -n1)

    $ ./scripts/bloat-o-meter ../vmlinux-000 ../obj/vmlinux | head -n1
    add/remove: 0/0 grow/shrink: 9/60 up/down: 124/-305 (-181)
    close failed in file object destructor:
    sys.excepthook is missing
    lost sys.stderr

    Link: http://lkml.kernel.org/r/20161028204618.GA29923@avx2
    Signed-off-by: Alexey Dobriyan
    Cc: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

27 Jul, 2016

1 commit

  • Python divisions are integer divisions unless at least one parameter is
    a float. The current bloat-o-meter fails to print sub-percentage
    changes:

    Total: Before=10515408, After=10604060, chg 0.000000%

    Force float division by using one float and pretty the print to two
    significant decimals:

    Total: Before=10515408, After=10604060, chg +0.84%

    Link: http://lkml.kernel.org/r/1465980311-23814-1-git-send-email-riku.voipio@linaro.org
    Signed-off-by: Riku Voipio
    Reviewed-by: Josh Triplett
    Cc: Vineet Gupta
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Riku Voipio
     

20 May, 2016

1 commit

  • This adds an additional line of output (to reduce the chances of
    breaking any existing output parsers) which prints the total size before
    and after and the relative difference.

    add/remove: 39/0 grow/shrink: 12408/55 up/down: 362227/-1430 (360797)
    function old new delta
    ext4_fill_super 10556 12590 +2034
    _fpadd_parts - 1186 +1186
    ntfs_fill_super 5340 6164 +824
    ...
    ...
    __divdf3 752 386 -366
    unlzma 3682 3274 -408
    Total: Before=5023101, After=5383898, chg 7.000000%
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    Link: http://lkml.kernel.org/r/1463124110-30314-1-git-send-email-vgupta@synopsys.com
    Signed-off-by: Vineet Gupta
    Cc: Josh Triplett
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vineet Gupta
     

15 Jan, 2016

1 commit

  • In Python3+ print is a function so the old syntax is not correct
    anymore:

    $ ./scripts/bloat-o-meter vmlinux.o vmlinux.o.old
    File "./scripts/bloat-o-meter", line 61
    print "add/remove: %s/%s grow/shrink: %s/%s up/down: %s/%s (%s)" % \
    ^
    SyntaxError: invalid syntax

    Fix by calling print as a function.

    Tested on python 2.7.11, 3.5.1

    Signed-off-by: Sergey Senozhatsky
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sergey Senozhatsky
     

24 Aug, 2014

1 commit


07 Nov, 2013

3 commits


23 Mar, 2011

1 commit

  • I'm not sure why the read-only data section is excluded from the report,
    it seems as relevant as the other data sections (b and d).

    I've stripped the symbols starting with __mod_ as they can have their
    names dynamically generated and thus comparison between binaries is not
    possible.

    Signed-off-by: Jean Delvare
    Cc: Andi Kleen
    Acked-by: Nathan Lynch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     

18 Dec, 2007

1 commit

  • bloat-o-meter assumes that a '.' anywhere in a symbol's name means that it
    is static and prepends 'static.' to the first part of the symbol name,
    discarding the portion of the name that follows the '.'. However, the
    names of function entry points begin with '.' in the ppc64 ABI. This
    causes all function text size changes to be accounted to a single 'static.'
    entry in the output when comparing ppc64 kernels.

    Change getsizes() to ignore the first character of the symbol name when
    searching for '.'.

    Signed-off-by: Nathan Lynch
    Cc: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nathan Lynch
     

26 Jun, 2006

1 commit


11 Apr, 2006

1 commit


09 Jan, 2006

1 commit

  • This is a rewrite of Andi Kleen's bloat-o-meter with sorting and reporting of
    gainers/decliners. Sample output:

    add/remove: 0/8 grow/shrink: 2/0 up/down: 88/-4424 (-4336)
    function old new delta
    __copy_to_user_ll 59 103 +44
    __copy_from_user_ll 59 103 +44
    fill_note 32 - -32
    maydump 58 - -58
    dump_seek 67 - -67
    writenote 180 - -180
    elf_dump_thread_status 274 - -274
    fill_psinfo 308 - -308
    fill_prstatus 466 - -466
    elf_core_dump 3039 - -3039

    The summary line says:
    no functions added, 8 removed
    two functions grew, none shrunk
    we gained 88 bytes and lost 4424 (or -4336 net)

    This work was sponsored in part by CE Linux Forum

    Signed-off-by: Matt Mackall
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Mackall