This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Compile performance of Linux kernels in mainline gcc


Hallo,

Did some comparisons of the compile speed of current mainline compared to the
3.3-hammer compiler from suse 9.1. Test environment is a fast dual EM64T 
box with HyperThreading, all compilations were done for x86-64 using native
compilers. I tested an 2.6.10rc1 based kernel with the x86-64 defconfig. 

Quick representative results: 

gcc 3.3-hammer:
210.32user 31.62system 3:57.66elapsed 

4.0 snapshot: 
262.71user 30.50system 4:48.46elapsed

4.0 is nearly a minute slower overall than 3.3. -O2 compile performance is quite bad.
Also the resulting kernel crashed early at boot.

Notes: 

All tests were with cache hot source and repeated multiple times and seemed
pretty stable (minor variations <1% between test results) 

--disable-checking was used of course (see below) 

4.0:
Configured with: configure --disable-checking --enable-languages=c,c++ --prefix=/pkg/gcc-4.0-041029
Thread model: posix
gcc version 4.0.0 20041030 (experimental)

vs 3.3-hammer compiler from suse 9.1:
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --disable-checking --libdir=/usr/lib64 --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib64 --with-system-zlib --enable-shared --enable-__cxa_atexit x86_64-suse-linux
Thread model: posix
gcc version 3.3.3 (SuSE Linux)

The suse 3.3-hammer was compiled with profiledbootstrap, while
4.0 only got an ordinary bootstrap (I can try it later with a profiledbootstrap
but I'm not sure I should expect much difference) 

A linux kernel is a complex C program compiled with -O2 
The files are relatively short, but it has a lot of includes to 
process. The standard compile options are: 
-Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2     -fomit-frame-pointer  
-mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks     -Wno-sign-compare 
-fno-asynchronous-unwind-tables -funit-at-a-time

-g is not used.

The machine has enough memory that everything was cached.

All compilation with -j8 which normally gives best result on this machine.

The warnings from the 4.0 snapshot were pretty messed up. It always 
printed binary garbage for function names. I assume there is already a PR
for it.

It printed a lot of new incomprehensible warnings like:
fs/reiserfs/bitmap.c:756: warning: pointer targets in passing argument 1 of <garbage>
Apart from being incorrect English what is that supposed to mean?

The 4.0 compiled kernels crashed very early at boot and didn't work. Haven't figured out
what's wrong yet.

-Andi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]