Re: [patch 00/2] improve .text size on gcc 4.0 and newer compilers

Ingo Molnar
2005-12-30T10:15:13Z

* Ingo Molnar <mingo@elte.hu> wrote:

> > I'm not quite sure I buy Ingo's original argument also. If he's only
> > looking at text size then with the above fixed then he ideally would
> > like to not inline anything (because except these exceptions above
> > .text usually near always shrinks when not inlining). But that's not
> > necessarily best for performance.
>
> well, i think the numbers talk for themselves. Here are my latest
> results:

i now have x86 allyesconfig numbers too:

text data bss dec filename
24190215 6737902 1775592 32703709 vmlinux-allyes-speed-orig
20096423 6758758 1775592 28630773 vmlinux-allyes-orig
19223511 6844002 1775656 27843169 vmlinux-allyes-inline+units+fixes+capable

i.e. enabling CONFIG_CC_OPTIMIZE_FOR_SIZE gives a 20.4% size reduction,
and adding my latest debloating-queue ontop of gives an additional 4.5%
of reduction. The queue is at:

http://redhat.com/~mingo/debloating-patches/

note: my focus is still mostly on CC_OPTIMIZE_FOR_SIZE (which is only
offered if CONFIG_EMBEDDED is enabled) - if you want a larger kernel
optimized for speed, do not enable it.

Ingo