Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 02 Aug 2002 10:45:10 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Dmitry Morozovsky <marck@rinet.ru>
Cc:        hackers@freebsd.org
Subject:   Re: -fomit-frame-pointer for the world build
Message-ID:  <3D4AC526.4CD399B3@mindspring.com>
References:  <20020802212841.R58905-100000@woozle.rinet.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Dmitry Morozovsky wrote:
> What are the drawbacks of building FreeBSD with -fomit-frame-pointer? As
> far as I can see, it saves both space (which is not as worth as disk space
> got cheaper and cheaper) and execution time (which is, AFAICC, more
> important).
> 
> I'd already done some tests, but not really deep.
> 
> Would you please clarify this issue abit, or point me to any articles
> describing exact -fomit-frame-pointer behaviour?

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":

`-fomit-frame-pointer'
     Don't keep the frame pointer in a register for functions that
     don't need one.  This avoids the instructions to save, set up and
     restore frame pointers; it also makes an extra register available
     in many functions.  *It also makes debugging impossible on some
     machines.*

     On some machines, such as the Vax, this flag has no effect, because
     the standard calling sequence automatically handles the frame
     pointer and nothing is saved by pretending it doesn't exist.  The
     machine-description macro `FRAME_POINTER_REQUIRED' controls
     whether a target machine supports this flag.  *Note Registers::.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D4AC526.4CD399B3>