From owner-freebsd-hackers Mon Aug 5 16:31:15 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B33F237B401 for ; Mon, 5 Aug 2002 16:31:12 -0700 (PDT) Received: from albatross.prod.itd.earthlink.net (albatross.mail.pas.earthlink.net [207.217.120.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3C3643E4A for ; Mon, 5 Aug 2002 16:31:11 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0270.cvx21-bradley.dialup.earthlink.net ([209.179.193.15] helo=mindspring.com) by albatross.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 17brJW-0004aR-00; Mon, 05 Aug 2002 16:31:02 -0700 Message-ID: <3D4F0A5F.9B76573F@mindspring.com> Date: Mon, 05 Aug 2002 16:29:35 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Darren Pilgrim Cc: Jason Andresen , Dmitry Morozovsky , hackers@freebsd.org Subject: Re: -fomit-frame-pointer for the world build References: <20020802212841.R58905-100000@woozle.rinet.ru> <3D4AC526.4CD399B3@mindspring.com> <3D4C8464.A2F4775A@pantherdragon.org> <3D4CC81F.94526C8A@mindspring.com> <3D4EA466.C1289F0F@mitre.org> <3D4EF091.EA1C91D3@pantherdragon.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Darren Pilgrim wrote: > > > The claimed savings are fictions. They are function call > > > overhead savings assuming an average number of arguments and > > > related pushed values, and they apply only to the call process > > > itself. Most time in programs is spent in running, not calling > > > functions, so if you expect an elimination of "18% overhead" > > > to make you programs that much faster, you are dreaming. > > > > On the other hand, -fomit-frame-pointer is the only optimization > > beyond -O in gcc that actually seems to offer any sort of speedup > > for me. I've seen 10 to 20% reduction in runtime on some programs > > with -fomit-frame-pointer. It's the only specific optimization I > > bother with anymore. > > What, if anything, have you come across that won't compile/run properly > when you use -fomit-frame-pointer? Not that this question has anything to do with the stuff you are quoting before asking it... If you attamept to mix code that does callee pop or tail call optimization (e.g. in a library) with code that omits the frame pointer, or vice versa, then either the caller is going to push something that is never popped, or the callee is going to pop something that is never pushed. For hand coded assembly functions, it's not possible to make it obey the options which control this (e.g when it is not the caller which does both the pushing and popping of arguments). In other words, -fomit-frame-pointer assumes that all function interfaces are reflexive. This is particularly an issue when using foreign ELF objects that ar distributed binary only by third parties (e.g. some of the Winmodem driver modules, binary drivers from vendors, like ETInc., etc.). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message