From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org, sam@ravnborg.org
Subject: Re: Reducing debuginfo size by removing unneeded includes
Date: Mon, 18 Feb 2008 10:41:00 -0300 [thread overview]
Message-ID: <20080218134100.GE4359@ghostprotocols.net> (raw)
In-Reply-To: <p73ir0mxvby.fsf@bingen.suse.de>
Em Mon, Feb 18, 2008 at 02:12:01PM +0100, Andi Kleen escreveu:
> Arnaldo Carvalho de Melo <acme@redhat.com> writes:
> >
> > [acme@doppio net-2.6]$ l /tmp/sys_ia32.o.before /tmp/sys_ia32.o.after
> > -rw-rw-r-- 1 acme acme 185240 2008-02-06 19:19 /tmp/sys_ia32.o.after
> > -rw-rw-r-- 1 acme acme 248328 2008-02-06 19:00 /tmp/sys_ia32.o.before
> >
> > Almost 64KB only on this object file!
>
> Just FYI, newer gcc does this in theory automatically when you specify
>
> -feliminate-unused-debug-types -feliminate-unused-debug-symbols
>
> But in my tests on gcc 4.1 / gcc 4.2 it doesn't seem to make any difference
> currently :/ Not sure what is wrong.
>
> There is also -feliminate-dwarf2-dups, but it seems to even increase
> obj dir size. Also -feliminate-dwarf2-dups seems to generate a lot of
>
> WARNING: vmlinux.o (.gnu.linkonce.wi.mmzone.h.97561702): unexpected section name.
> The (.[number]+) following section name are ld generated and not expected.
> Did you forget to use "ax"/"aw" in a .S file?
> Note that for example <linux/init.h> contains
> section definitions for use in .S files.
>
> etc. warnings But the kernel builds fine even with those warnings.
>
> Still if you just want to shrink objdir size then figuring out
> what's wrong with these options and then specifying them would be
> probably the best strategy than to try to do it all manually.
>
> That said removing unused includes is of course a valuable
> clean up by itself, I'm just not sure it's the best way to get
> smaller object dirs.
I found just it to be another reason for cleaning up the includes hell,
but I agree completely that the correct solution is for gcc to do the
right thing and eliminate unused debug types.
Thanks for showing that there is support for that in latest gccs, I'll
try to use it when I get back to looking at this issue.
- Arnaldo
next prev parent reply other threads:[~2008-02-18 13:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-07 23:03 Reducing debuginfo size by removing unneeded includes Arnaldo Carvalho de Melo
2008-02-17 14:00 ` Thomas Gleixner
2008-02-18 5:12 ` Ingo Molnar
2008-02-18 13:12 ` Andi Kleen
2008-02-18 13:41 ` Arnaldo Carvalho de Melo [this message]
2008-02-18 14:50 ` Andi Kleen
2008-02-18 14:22 ` Arnaldo Carvalho de Melo
2008-02-18 14:01 ` Sam Ravnborg
2008-02-24 7:58 ` Sam Ravnborg
2008-02-24 8:25 ` Samuel Tardieu
2008-02-24 9:07 ` Sam Ravnborg
2008-02-24 12:23 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080218134100.GE4359@ghostprotocols.net \
--to=acme@redhat.com \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox