mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Willy Tarreau <willy@w.ods.org>
To: Willy Tarreau <willy@w.ods.org>,
	David Zaffiro <davzaffiro@netscape.net>,
	linux-kernel@vger.kernel.org
Subject: Re: Compiling x86 with and without frame pointer
Date: Thu, 21 Nov 2002 20:41:27 +0100	[thread overview]
Message-ID: <20021121194127.GA22442@alpha.home.local> (raw)
In-Reply-To: <20021121193231.GE14063@redhat.com>

On Thu, Nov 21, 2002 at 02:32:31PM -0500, Doug Ledford wrote:
> On Thu, Nov 21, 2002 at 08:20:45PM +0100, Willy Tarreau wrote:
> > On Thu, Nov 21, 2002 at 10:30:49AM +0100, David Zaffiro wrote:
> > > I use -momit-leaf-frame-pointer for optimization in some own projects, 
> > > instead of the "-fomit-frame-pointer". For me, this results in better 
> > > codesize/speed compared to both "-fomit-frame-pointer" or no option at 
> > > all. Actually gcc-2.95 seems to support this feature as well, but it 
> > > never made it into the 2.95 docs... It makes debugging a lot easier too.
> > > 
> > > So anyone "caring to benchmark", could you please test the 
> > > "-momit-leaf-frame-pointer" option for x86 as well...
> > 
> > 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.
> 
> These numbers are useless.  Since a change in frame pointer setup changes 
> the code sequences in the text section, it is likely to also change 
> maximum acheived compression.  Therefore, the size of the compressed 
> images can not be compared and result in any useable data, you need to 
> compare the size of the uncompressed images.

Yes, you're quite right about this. I had my mind obsessed all the day reducing
a bzImage to fit it on a diskette, and didn't immediately realise that other
people were speaking pure vmlinux in this discussion :-)

So I retried, and the difference in vmlinux between -fomit-frame-pointer and
-momit-leaf-frame-pointer is nearly 1 kB LESS for the last one (difference
in text only). So David was right here. Please also node that the code is
really less compressible because 1 kB less gives 4 kB more after compression.
Even after upx, the difference is still 3 kB between the two images.

Anyway, the compressed size is sometimes more relevant than the vmlinux one,
when it comes to put it on very limited devices such as diskettes. In my case,
I don't need this extra 1 kB ram, I prefer those 4 kB floppy image for another
NIC driver !

I haven't benchmarked anything with these options. Maybe David's suggestion
is interesting for userland where compression is rarely used.

Cheers,
Willy


  reply	other threads:[~2002-11-21 19:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-21  4:47 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 [this message]
2002-11-21 20:00           ` Doug Ledford
2002-11-25  8:47       ` David Zaffiro
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=20021121194127.GA22442@alpha.home.local \
    --to=willy@w.ods.org \
    --cc=davzaffiro@netscape.net \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®