From: David Zaffiro <davzaffiro@netscape.net>
To: willy@w.ods.org
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Compiling x86 with and without frame pointer
Date: Mon, 25 Nov 2002 09:47:00 +0100 [thread overview]
Message-ID: <3DE1E384.8000801@netscape.net> (raw)
In-Reply-To: 20021121192045.GE3636@alpha.home.local
I can understand why not omitting framepointers generates better
compressible code, since every function will start with:
push %ebp
mov %esp,%ebp
and end with:
leave
ret
But it's harder to find a reason why -fomit-frame-pointer is better
compressible that -momit-leaf-frame-pointer (but it's probably related
to a lot of mov's with stackpointer involved), especially since
"-momit-leaf-frame-pointer" makes a trade-off between both other
options: it omits framepointers for leaf functions (callees that aren't
callers as well) and it doesn't for branch-functions.
The mixture of functions with frame-pointers and those without is
probably causing bzip to compress less optimal.
Anyway it makes me wonder, whether kernelcompilation shouldn't be
configurable between a "optimize for (compressed image) size" and a
"optimize for speed" option... I'd go for speed... (and always omitting
frame-pointers doesn't seem to as fast as omitting them only in leaf
functions).
> Well, I tried on a 2.4.18+patches with gcc 2.95.3. bzImage is :
> 538481 bytes with -fomit-frame-pointer
> 538510 bytes with no particular flag
> 542137 bytes with -momit-leaf-frame-pointer.
>
> So -fomit-frame-pointer shows the same as other's observation, but in this
> particular case, -momit-leaf-frame-pointer made a slightly bigger kernel.
next prev parent reply other threads:[~2002-11-25 8:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-21 4:47 Compiling x86 with and without frame pointer Keith Owens
2002-11-21 5:06 ` Mark Mielke
2002-11-21 9:30 ` David Zaffiro
2002-11-21 19:20 ` Willy Tarreau
2002-11-21 19:32 ` Doug Ledford
2002-11-21 19:41 ` Willy Tarreau
2002-11-21 20:00 ` Doug Ledford
2002-11-25 8:47 ` David Zaffiro [this message]
2002-11-25 8:52 ` Willy Tarreau
2002-11-25 14:55 ` Denis Vlasenko
2002-11-25 15:00 ` Denis Vlasenko
2002-11-25 11:57 ` David Zaffiro
2002-11-21 12:55 ` Dave Jones
2002-11-21 14:46 ` Alan Cox
2002-11-21 17:44 ` Martin J. Bligh
2002-11-21 23:47 ` Rudmer van Dijk
2002-11-25 8:59 ` David Zaffiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DE1E384.8000801@netscape.net \
--to=davzaffiro@netscape.net \
--cc=linux-kernel@vger.kernel.org \
--cc=willy@w.ods.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.