* [PATCH] fix bloat-o-meter for ppc64
@ 2007-12-14 23:38 Nathan Lynch
0 siblings, 0 replies; only message in thread
From: Nathan Lynch @ 2007-12-14 23:38 UTC (permalink / raw)
To: Matt Mackall; +Cc: linux-kernel, linuxppc-dev, Andrew Morton
bloat-o-meter assumes that a '.' anywhere in a symbol's name means
that it is static and prepends 'static.' to the first part of the
symbol name, discarding the portion of the name that follows the '.'.
However, the names of function entry points begin with '.' in the
ppc64 ABI. This causes all function text size changes to be accounted
to a single 'static.' entry in the output when comparing ppc64
kernels.
Change getsizes() to ignore the first character of the symbol name
when searching for '.'.
Signed-off-by: Nathan Lynch <ntl@pobox.com>
---
scripts/bloat-o-meter | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter
index ce59fc2..6501a50 100755
--- a/scripts/bloat-o-meter
+++ b/scripts/bloat-o-meter
@@ -18,7 +18,8 @@ def getsizes(file):
for l in os.popen("nm --size-sort " + file).readlines():
size, type, name = l[:-1].split()
if type in "tTdDbB":
- if "." in name: name = "static." + name.split(".")[0]
+ # 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)
return sym
--
1.5.3.7.1112.g9758e
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-14 23:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-14 23:38 [PATCH] fix bloat-o-meter for ppc64 Nathan Lynch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®