This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: more patches
- To: Zack Weinberg <zack@rabi.phys.columbia.edu>
- Subject: Re: more patches
- From: Ulrich Drepper <drepper@cygnus.com>
- Date: 09 Jun 1998 07:45:21 -0700
- Cc: Philip Blundell <pb@nexus.co.uk>, libc-hacker@gnu.org
- References: <199806091336.JAA05511@rabi.phys.columbia.edu>
- Reply-To: drepper@cygnus.com (Ulrich Drepper)
Zack Weinberg <zack@rabi.phys.columbia.edu> writes:
> I've never liked that restriction, especially on x86 where registers
> are so scarce. Backtraces are likely to be useful in `production'
> code (print backtrace on internal error, with request to mail to
> author) where you wouldn't need full debuggability and might want the
> speed benefits of -fomit-frame-pointer.
It is absolutely unclear whether -fomit-frame-pointer really makes a
difference. If you look at the timings you'll see that accessing the
stack through the %esp register is penalized in contrast to accessing
it through %ebp. %esp is a special register with special dependencies
and this reflects in the execution time.
Therefore gcc has the -omit-leaf-frame-pointer option on Intel and
this is what I always use. Leaf functions tend to be small and here
the difference between building the stack frame or not makes a
difference. But since any situation in which backtrace() can be
called does not involve leaf functions (obviously) this option is a
good replacement to be used in production code.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------