Commit c50e3f51 authored by Jean Delvare's avatar Jean Delvare Committed by Linus Torvalds

bloat-o-meter: include read-only data section in report

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: default avatarJean Delvare <khali@linux-fr.org>
Cc: Andi Kleen <andi@firstfloor.org>
Acked-by: default avatarNathan Lynch <ntl@pobox.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 565d76cb
...@@ -17,7 +17,9 @@ def getsizes(file): ...@@ -17,7 +17,9 @@ def getsizes(file):
sym = {} sym = {}
for l in os.popen("nm --size-sort " + file).readlines(): for l in os.popen("nm --size-sort " + file).readlines():
size, type, name = l[:-1].split() size, type, name = l[:-1].split()
if type in "tTdDbB": if type in "tTdDbBrR":
# strip generated symbols
if name[:6] == "__mod_": continue
# function names begin with '.' on 64-bit powerpc # function names begin with '.' on 64-bit powerpc
if "." in name[1:]: name = "static." + name.split(".")[0] if "." in name[1:]: name = "static." + name.split(".")[0]
sym[name] = sym.get(name, 0) + int(size, 16) sym[name] = sym.get(name, 0) + int(size, 16)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment