13 Dec, 2016
2 commits
-
Every often used regex is better be compiled in Python.
Speedup is about ~9.8% (whee!)
$ perf stat -r 16 taskset -c 15 ./scripts/bloat-o-meter ../vmlinux-000 ../obj/vmlinux >/dev/null
7.091202853 seconds time elapsed ( +- 0.15% )+re.compile
6.397564973 seconds time elapsed ( +- 0.34% )Link: http://lkml.kernel.org/r/20161119004417.GB1200@avx2
Signed-off-by: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
readlines() conses whole list before doing anything which is slower for
big object files. Use per line iterator.Speed up is ~2% on "allyesconfig" type of kernel.
$ perf stat -r 16 taskset -c 15 ./scripts/bloat-o-meter ../vmlinux-000 ../obj/vmlinux >/dev/null
...Before: 7.247708646 seconds time elapsed ( +- 0.28% )
After: 7.091202853 seconds time elapsed ( +- 0.15% )Link: http://lkml.kernel.org/r/20161119004143.GA1200@avx2
Signed-off-by: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
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.stderrLink: 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
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
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
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 syntaxFix 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
24 Aug, 2014
1 commit
-
This avoids double-counting size changes in syscall implementations.
Signed-off-by: Josh Triplett
07 Nov, 2013
3 commits
-
str.startswith has existed since at least Python 2.0, in 2000; use it
rather than a fragile comparison against an initial slice of a string,
which requires hard-coding the length of the string to compare against.Signed-off-by: Josh Triplett
Signed-off-by: Andrew Morton
Signed-off-by: Michal Marek -
linux_banner can change size due to changes in the compiler, build number,
or the user@host the system was compiled on; ignore size changes in
linux_banner entirely.Signed-off-by: Josh Triplett
Signed-off-by: Andrew Morton
Signed-off-by: Michal Marek -
Disable static detection: the static currently drops a lot of useful
information including clones generated by gcc. Drop this. The statics
will appear now without static. prefix.But remove the LTO .NUMBER postfixes that look ugly
Signed-off-by: Andi Kleen
Signed-off-by: Michal Marek
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
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
26 Jun, 2006
1 commit
-
Upgrade scripts/bloat-o-meter to handle the names gcc 4 gives static
symbols.Signed-off-by: Rob Landley
Signed-off-by: Matt Mackall
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Apr, 2006
1 commit
-
Make it executable like it should be. Do the same for other files intended to be
executed by the user - the ones called by the build process needn't be
executable as they already work (as argument to their interpreter).Signed-off-by: Paolo 'Blaisorblade' Giarrusso
Signed-off-by: Sam Ravnborg
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 - -3039The 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