Tweak suggested by Matt Mackall when I submitted the bloat-o-meter changes

back to linux-kernel...
This commit is contained in:
Rob Landley 2006-05-08 18:30:33 +00:00
parent d61b8d8f9b
commit 712ba85b30

View File

@ -18,9 +18,8 @@ def getsizes(file):
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 "tTdDbB":
if name.find(".") != -1: name = "static." + name.split(".")[0] if "." in name: name = "static." + name.split(".")[0]
if name in sym: sym[name] += int(size, 16) sym[name] = sym.get(name, 0) + int(size, 16)
else :sym[name] = int(size, 16)
return sym return sym
old = getsizes(sys.argv[1]) old = getsizes(sys.argv[1])