Code Review for 6877221

Prepared by:never on Tue Feb 16 12:08:57 PST 2010
Compare against: /net/smite.sfbay/export/ws/baseline
Summary of changes: 3 lines changed: 2 ins; 1 del; 0 mod; 2206 unchg
Patch of changes: 6877221.patch
Author comments:
6877221: Endless deoptimizations in OSR nmethod

When emitting the inline exception code if we can't handle all the
exception types inline we will try to fall back to an uncommon trap
for bytecodes that can be rerun to produce the exceptional condition.
All bytecodes except the various invokes can be handled this way. The
cases we currently can't handle inline are unloaded catch classes,
which will require class loading during lookup and catch classes that
have subclasses. That latter is a historical limitation from the
times when type checks were more expensive. Currently athrow is
handled by rerunning it which means that any exception forwarding
logic that uses athrow will force us back into the interpreter for
every exception dispatch through this nmethod. Since this fix will
likely be backported I want to do the simple fix of removing athrow
from the set of rerunnable bytecodes. A more complete fix involving
rewriting catch_inline_exceptions to avoid the uncommon trap with
Action_none and to perform full type checks inline will be done for
hs18 under the bug id 6926979.

I collected some stats on how catch_inline_exceptions behaves to get
some sense of which paths are used. These numbers are generated every
benchmark in reference_server plus specjvm2008. In 22631 calls, 16050
terminate by unwinding the frame, 3280 dispatch to a default exception
handler, 3176 call the rethrow function, and 125 emit an uncommon
trap. Of those uncommon traps the bytecode breakdown is this:

14 anewarray
52 athrow
52 new
7 newarray

Of the athrows, 43 are from unloaded classes and the other 9 are
because the catch class had subclasses.

Legend: Modified file
Deleted file
New file

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/opto/parse1.cpp

3 lines changed: 2 ins; 1 del; 0 mod; 2206 unchg

This code review page was prepared using /never/bin/webrev (vers 23.18-hg-never).