public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Dave Korn <dave.korn.cygwin@googlemail.com>
Cc: SD <stardust496@gmail.com>, gcc@gcc.gnu.org
Subject: Re: Exception handling information
Date: Fri, 21 Aug 2009 07:48:00 -0000	[thread overview]
Message-ID: <m3zl9t6dnq.fsf@google.com> (raw)
In-Reply-To: <4A8E0B8D.1090403@gmail.com> (Dave Korn's message of "Fri\, 21 Aug 2009 03\:50\:53 +0100")

Dave Korn <dave.korn.cygwin@googlemail.com> writes:

> The
> DW2 version has zero overhead in terms of execution time when no exceptions
> are thrown, but adds a noticeable amount of memory usage for the eh tables.

For the extremely picky (and who among us is not extremely picky) there
is still some overhead in the dwarf2 version.  We do not have good
separation between hot and cold code, which means that exception
handling code occupies pages which otherwise contain useful instructions
and in some cases even occupies useful instruction cache lines.
Ironically, -freorder-blocks-and-partition, which seems tailor-made to
fix this, is disabled when exception handling is used.

Also, when exception handling is enabled, it becomes impossible to do
certain types of instruction reordering.  While this has only a mild
effect on x86 with its out-of-order execution, it has a noticeable
effect on in-order architectures, particularly those with delay slots.
Look for all the uses of can_throw in the compiler to see the effect.
This effect is more significant with -fasynchronous-unwind-tables.

Ian

  reply	other threads:[~2009-08-21  3:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-21  6:38 SD
2009-08-21  6:45 ` Dave Korn
2009-08-21  7:48   ` Ian Lance Taylor [this message]
2009-08-25 18:43     ` Jason Merrill
2009-08-25 20:11       ` Jason Merrill
2009-08-25 22:25       ` Ian Lance Taylor

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=m3zl9t6dnq.fsf@google.com \
    --to=iant@google.com \
    --cc=dave.korn.cygwin@googlemail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=stardust496@gmail.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).