exception handling poll
Robin Kirkham
Robin.Kirkham@mlb.dmt.csiro.au
Fri Oct 17 02:51:00 GMT 1997
On Thu, 16 Oct 1997, meissner@cygnus.com wrote:
> | If the .eh_frame section does not get paged into memory, then I think 10% is
> | acceptable (remember that the in-memory penalty is essentially zero). For
> | kernels or embedded code where there is no paging, the acceptable figure
> | is smaller, and I suspect that folks would use -fno-exceptions no matter
> | how small the penalty is (unless it is 2% or less).
>
> Some of the GCC ports I've done, even 2% is unacceptable (when you only have
> 32k or whatever, it does become critical not to have extra overhead).
I'll second that: sometimes it is 0. On-chip memory size on embedded micros
doesn't seem to be growing at the same relative rate as workstations. And
since the parts count matters so much these days, engineers are reluctant
to give you any off-chip memory, especially if it is because of the compiler
tools you are using! (And they will serve you with that apocryphal tale about
the object-oriented toaster, again).
This is, of course, a wider issue than just the compiler, and applies to the
libraries as well. For instance, many people write one C++ class definition
per source file, so the linker is forced to load object code for the entire
class, even if you only use--implictly or explicitly--a couple of methods.
Convenient for the class writer, but not for the poor sod who must go through
and split it up into smaller modules, just so she of he can fit it in the
target hardware.
My point is that while executable speed performance and programming features
like exception handling are obviously important to egcs and the libraries,
don't forget the folks in the less glamourous, embedded end of town.
Robin Kirkham CSIRO Manufacturing Science and Technology
Project Engineer Locked Bag 9, Preston 3072, Australia
robin.kirkham@mlb.dmt.csiro.au Phone: +61 3 9662-7756 Fax: +61 3 9662-7851
More information about the Gcc
mailing list