Re: Arjan's noinline Patch

From: Jan Engelhardt
Date: Mon Jan 02 2006 - 16:32:03 EST


Hi,

>> the "noinline" cases were built with Arjan's patch and
>> CONFIG_CC_OPTIMIZE_FOR_SIZE; the "inline" kernels were built,
>> obviously, without the patch and without CONFIG_CC_OPTIMIZE_FOR_SIZE.
>
> Wait, so how do we know if its GCC's -Os that caused the reduction in .text
> size, or the noinline patch ... ?
>
> To get actual results, you should either take OPTIMIZE_FOR_SIZE out the
> equation or use it on the other kernel as well...

I tried various kernel compilations; for fun and joy, I built a totally
monolithic kernel with almost all options turned on. I probably won't
boot it, heh. First, there were some modules/sourcefiles that fail to
compile:

CONFIG_MTD_AMDSTD
CONFIG_MTD_JEDEC
CONFIG_FB_PM3

There are also some issues in drivers/net/wan/sdla_*.c that I had to
fix before make was able to link to .tmp_vmlinux1.bin. I will post a
compile-fix in another thread. Now back to the inlining part. I have a
number of flavors to show...

All done with gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)

std: vanilla 2.6.15-rc7
Os: vanilla + CONFIG_OPTIMIZE_FOR_SIZE
noinl: vanilla + Arjan's noinline
noinl-Os: vanilla + CONFIG_OPTIMIZE_FOR_SIZE + noinline
Specials:
NFI: no forced inline (removal of always_inline part)

Information from make (bzImage):
std: System is 12226 kB
Os: System is 10879 kB
noinl: System is 12181 kB
noinl-Os: System is 10851 kB
NFI: System is 12198 kB

ls -l:
-rwxr-xr-x 26999081 Jan 2 17:43 rc7-noinl-Os/vmlinux
-rwxr-xr-x 27115266 Jan 2 15:48 rc7-Os/vmlinux
-rwxr-xr-x 30010293 Jan 2 17:24 rc7-noinl/vmlinux
-rwxr-xr-x 30058462 Jan 2 19:37 rc7-NFI/vmlinux
-rwxr-xr-x 30150993 Jan 2 15:45 rc7-std/vmlinux

size:
text data bss dec hex filename
17188479 5984442 1738248 24911169 17c1d41 rc7-noinl-Os/vmlinux
17313751 5980978 1738248 25032977 17df911 rc7-Os/vmlinux
20174873 5991726 1738248 27904847 1a9cb4f rc7-noinl/vmlinux
20222221 5992278 1738248 27952747 1aa866b rc7-NFI/vmlinux
20321527 5988706 1738248 28048481 1abfc61 rc7-std/vmlinux


Jan Engelhardt
--
| Alphagate Systems, http://alphagate.hopto.org/
| jengelh's site, http://jengelh.hopto.org/
-
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/