This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR 16373: -fomit-frame-pointer when optimizing on x86


On Mon, Jul 12, 2004 at 02:33:44PM +0200, Florian Weimer wrote:
> > It increases read-only data, and as long as .eh_frame/.eh_frame_hdr
> > sections are never used by the application, because
> > .eh_frame/.eh_frame_hdr/.gcc_except_table sections are located these days
> > at the end of the read-only ELF segment, the size impact is either zero,
> > or at most a partial 4KB page.
> 
> I don't understand your distinction between code and data directly
> supporting code execution.  If executable machine code size is the
> only criterion, we could compile code to P-code and have almost zero
> code size, but I fail to see how this would help those who struggle
> with code size.

Frame unwind info is data supporting code execution only when you actually
query the unwind data.
If you don't need the unwind info, the impact is (almost) zero.
If you need it, then its size of course matters, but certainly is not
"fixed" by not generating it at all.
Roger was suggesting to -fomit-frame-pointer by default but not
-fasynchronous-unwind-tables and tell people that if they need
backtrace(3), they need to recompile their stuff (plus any libraries
which might show up in the backtraces) with -fasynchronous-unwind-tables
or -fno-omit-frame-pointer.
I claim that there is no justification for this from the code-size POV
and unless the suggestion would be always -fa-u-t, it is going to lead
to severe problems as well.
(glibc backtrace(3) can either use unwind info only, or use frame pointers
only, or can use unwind info first and when unwind info stops, use frame
pointers.  But it can hardly use frame pointers for a few frames and
then switch back to unwind info).

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]