From owner-freebsd-hackers Tue Jan 14 13:35:48 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id NAA09723 for hackers-outgoing; Tue, 14 Jan 1997 13:35:48 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id NAA09718 for ; Tue, 14 Jan 1997 13:35:47 -0800 (PST) Received: from basil.cdt.luth.se (root@basil.cdt.luth.se [130.240.64.67]) by who.cdrom.com (8.7.5/8.6.11) with ESMTP id NAA26882 for ; Tue, 14 Jan 1997 13:35:33 -0800 (PST) Received: from garlic.cdt.luth.se (root@garlic.cdt.luth.se [130.240.64.62]) by basil.cdt.luth.se (8.7.5/8.7.3) with ESMTP id WAA00915; Tue, 14 Jan 1997 22:28:31 +0100 (MET) Received: from garlic.cdt.luth.se (dot@localhost [127.0.0.1]) by garlic.cdt.luth.se (8.6.12/8.6.12) with ESMTP id WAA14508; Tue, 14 Jan 1997 22:20:48 +0100 Message-Id: <199701142120.WAA14508@garlic.cdt.luth.se> X-Mailer: exmh version 2.0beta 12/23/96 To: Joao Carlos Mendes Luis cc: andrew@ugh.net.au, hackers@freebsd.org, dot@cdt.luth.se Subject: Re: Compiling kernel with optimisation In-reply-to: Your message of "Sun, 12 Jan 1997 20:31:17 -0200." <199701122231.UAA22599@gaia.coppe.ufrj.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 14 Jan 1997 22:20:47 +0100 From: Magnus Enbom Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > #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. /.