Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jan 1997 22:20:47 +0100
From:      Magnus Enbom <dot@cdt.luth.se>
To:        Joao Carlos Mendes Luis <jonny@mailhost.coppe.ufrj.br>
Cc:        andrew@ugh.net.au, hackers@freebsd.org, dot@cdt.luth.se
Subject:   Re: Compiling kernel with optimisation 
Message-ID:  <199701142120.WAA14508@garlic.cdt.luth.se>
In-Reply-To: Your message of "Sun, 12 Jan 1997 20:31:17 -0200." <199701122231.UAA22599@gaia.coppe.ufrj.br> 

next in thread | previous in thread | raw e-mail | index | archive | help
> #define quoting(David Greenman)
> // >I just noticed that when compiling a kernel it is done with the -O flag.
> // >Would there be much speed improvement in the sytem if it was done with
> // >-O3? Would this break the kernel or is the added time it takes to compile
> // >not worth the benfits?
> // 
> //    It has very little effect on performance and optimizations levels > "-O"
> // have traditionally been broken in gcc.
> 
> Well, the NetBSD team has managed to compile their kernel with -O6
> and -Wall, but they had to change lots of things..
> 
> I don't know what do you call "little effect on performance", but
> 5% gain would be enough to make me think about.  Unfortunately,
> I don't have any measurements (and even don't know how to do them).
> 
> I tried -O6 once, and 2 files were broken in compile time !!! (Wow)
> I did dare once more, fixing those files and running that kernel.
> Panic in 5 seconds.  :(

I've built kernels with -O2 -m486 and used them without problems.
If you're using anything higher you get the -finline-functions option added to 
gcc, that will break a few things. 

/.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701142120.WAA14508>