Re: [PATCH] Small patch to bloat-o-meter.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
> ---
> 
> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux