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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to