This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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: Exception Handling


Chris Gray writes:
 > On Saturday 12 June 2004 17:47, Andrew Haley wrote:
 > > Jeroen Frijters writes:
 > >  > Chris Gray wrote:
 > >  > > I don't have any hard numbers either, but my experience leads
 > >  > > me to believe that exceptions are thrown far more often than most
 > >  > > VM/compiler developers would like to think.
 > >  >
 > >  > I agree.
 > >
 > > It's possible, but AFAICS the really interesting number is the ratio
 > > of try/throw.
 > 
 > >From the gcj point of view, yes.

>From any point of view, surely.  If we're trying to minimize runtime
in the usual case, that's what we need to know.  Speeding up code in
the case when the whole system fails seems, well, less interesting...
:-)

 > The number of stack frames which have to be unwound is probably
 > also of interest: my guess would be that many throws are caught in
 > the same stack frame, but a substantial number will propagate a
 > long way up the stack.
 > 
 > I think the measurements will have to be done by instrumenting the
 > compiler - it's not easy for a runtime such as IKVM (or Wonka) to
 > know that a try{} block is being entered. IOW I'm not volunteering
 > to make the measurements, just suggesting that Somebody should do
 > something. :)

Well, I can do it easily, but then I have to have a corpus of code to
measure.  And some reason to do the study at all: unless there is a
realistic prospect of defining a new unwinder mechanism, there will be
little point.

Andrew.


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