Messages in this thread | | | Date | Sun, 7 May 2006 22:02:16 -0500 | From | Matt Mackall <> | Subject | Re: [PATCH] Small patch to bloat-o-meter. |
| |
On Sun, May 07, 2006 at 03:59:00PM -0400, Rob Landley wrote: > Workaround for the fact that gcc 4.x no longer provides consistent names for > static symbols. > > Signed-off-by: Rob Landley <rob@landley.net> > --- > > When I added bloat-o-meter to busybox, I had to fix this to get useful > results. Since the kernel version seems to be the master, I thought you > might be interested. > > --- linux-old/scripts/bloat-o-meter 2006-05-07 15:47:23.000000000 -0400 > +++ linux-2.6.16/scripts/bloat-o-meter 2006-05-07 15:08:31.000000000 -0400 > @@ -18,7 +18,9 @@ > for l in os.popen("nm --size-sort " + file).readlines(): > size, type, name = l[:-1].split() > if type in "tTdDbB": > - sym[name] = int(size, 16) > + if name.find(".") != -1: name = "static." + name.split(".")[0]
if "." in name:
(just like 'if type in "tTdDbB":' above it)
> + if name in sym: sym[name] += int(size, 16) > + else :sym[name] = int(size, 16)
else:
Actually, this probably wants to be:
sym.setdefault(name, 0) += int(size, 16)
-- Mathematics is the supreme nostalgia of our time. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |