Skip to content

Commit

Permalink
bloat-o-meter: include read-only data section in report
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Andi Kleen <[email protected]>
Acked-by: Nathan Lynch <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Jean Delvare authored and torvalds committed Mar 23, 2011
1 parent 565d76c commit c50e3f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/bloat-o-meter
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ def getsizes(file):
sym = {}
for l in os.popen("nm --size-sort " + file).readlines():
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
if "." in name[1:]: name = "static." + name.split(".")[0]
sym[name] = sym.get(name, 0) + int(size, 16)
Expand Down

0 comments on commit c50e3f5

Please sign in to comment.