From owner-freebsd-hackers Sat Aug 3 23:23:28 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 7A9B837B400 for ; Sat, 3 Aug 2002 23:23:26 -0700 (PDT) Received: from goose.mail.pas.earthlink.net (goose.mail.pas.earthlink.net [207.217.120.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2148743E4A for ; Sat, 3 Aug 2002 23:23:26 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0300.cvx22-bradley.dialup.earthlink.net ([209.179.199.45] helo=mindspring.com) by goose.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17bEnK-0001Ms-00; Sat, 03 Aug 2002 23:23:14 -0700 Message-ID: <3D4CC81F.94526C8A@mindspring.com> Date: Sat, 03 Aug 2002 23:22:23 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Darren Pilgrim Cc: 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> 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: > Terry Lambert wrote: > > Dmitry Morozovsky wrote: > > > What are the drawbacks of building FreeBSD with -fomit-frame-pointer? > > > > The frame pointer is used for debugging, specifically for the > > stack traceback function to know arguments. Removing it means > > losing some debugging functionality. Next time try "info gcc": > > If you don't have any need for debugging your software, is there any > use for frame pointers? Is this something that can safely be used for > both CFLAGS and COPTFLAGS? You can't use it in conjunction with calee pop, if you have mixed code. So it really depends on what other optimizations you throw in the mix, and then you have the problem of interfacing with assembly language code, as well -- the calling standard has to match, if it's asymmetric (i.e. not "caller push, caller pop"), and assembly code is hand-coded in this respect in most cases. 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. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message