* [PATCH] bloat-o-meter: Include read-only data section in report
@ 2011-03-02 17:15 Jean Delvare
2011-03-02 19:46 ` Nathan Lynch
0 siblings, 1 reply; 2+ messages in thread
From: Jean Delvare @ 2011-03-02 17:15 UTC (permalink / raw)
To: LKML; +Cc: Andi Kleen, Nathan Lynch, Andrew Morton
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 <khali@linux-fr.org>
---
Disclaimer: I don't know anything about python.
scripts/bloat-o-meter | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- linux-2.6.38-rc6.orig/scripts/bloat-o-meter 2011-03-02 17:55:46.000000000 +0100
+++ linux-2.6.38-rc6/scripts/bloat-o-meter 2011-03-02 17:57:05.000000000 +0100
@@ -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)
--
Jean Delvare
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] bloat-o-meter: Include read-only data section in report
2011-03-02 17:15 [PATCH] bloat-o-meter: Include read-only data section in report Jean Delvare
@ 2011-03-02 19:46 ` Nathan Lynch
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Lynch @ 2011-03-02 19:46 UTC (permalink / raw)
To: Jean Delvare; +Cc: LKML, Andi Kleen, Andrew Morton
On Wed, 2011-03-02 at 18:15 +0100, Jean Delvare wrote:
> 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 <khali@linux-fr.org>
Seems to do the right thing here.
Acked-by: Nathan Lynch <ntl@pobox.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-02 19:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-02 17:15 [PATCH] bloat-o-meter: Include read-only data section in report Jean Delvare
2011-03-02 19:46 ` 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®