Re: [PATCH] Clarify CONFIG_DEBUG_INFO's bloaty nature

From: Linus Torvalds
Date: Mon Feb 03 2014 - 17:47:24 EST


On Mon, Feb 3, 2014 at 2:00 PM, David Rientjes <rientjes@xxxxxxxxxx> wrote:
>
> How do you define "huge bloat" if the size of vmlinux doesn't increase?

Don't be silly. The size of all the object files increase *hugely*.

This is my fs/builtin.o in my normal config:

-rw-rw-r--. 1 torvalds torvalds 2838613 Feb 3 14:32 fs/built-in.o

and with the *reduced* debug info, ie .config diff as follows:

+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_INFO_REDUCED=y

I get this:

-rw-rw-r--. 1 torvalds torvalds 11793317 Feb 3 14:33 fs/built-in.o

iow, that "reduced" debug info is still more than 4x bigger than a
non-debug-info kernel.

David, if you don't think that debug-info bloats the build, you're in
huge *huge* denial. CONFIG_DEBUG_INFO (even with the "reduced" thing)
is ABSOLUTELY HORRIBLE CRAP.

> Would some people consider that to be acceptable but now mysteriously
> confused because we don't know what "huge bloat" you're referring to?

That >4x size increase doesn't match your idea of "huge bloat"?

The object files being much bigger really does screw you especially on
laptops that often have less memory and less capable IO subsystems.
The final links in particular tend to be much bigger and use much more
memory.

I suspect a lot of people are in denial about just how *horrible* the
overhead of debug builds are. And yeah, if you have oodles of memory
to cache things, it's not too bad. But you really want to have *lots*
of memory, because otherwise you won't be caching all those object
files in RAM, and your build easily becomes IO bound at link time. A
factor of four size difference will not be helping your poor slow
laptop disk..

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/