hg: mlvm/mlvm/hotspot: indy.compiler.inline: Added generated bytecode adapters.
Christian.Thalinger at Sun.COM
Fri Aug 21 07:39:52 PDT 2009
This commit adds generated bytecode adapters for MethodHandles. With
these adapters it's possible to inline the whole path of a
MethodHandleChain, plus the ultimate target, into the caller.
But keep in mind: THIS IS WORK IN PROGRESS and is not enabled by default!
A lot of stuff already works, like a number of JRuby benchmarks, but
there are also various crashes (that I actually know about).
To get your whole call path inlined you may need to tweak the inlining
thresholds a little. To inline the call path of a simple GuardWithTest
testcase I need to use:
-XX:InlineSmallCode=1500 -XX:MaxInlineSize=50 -XX:MaxInlineLevel=15
To find out what thresholds are best for you, build a debug JVM and use:
If you see something like:
@ 4 sun.dyn.ToGeneric$A1::invoke_I already compiled into a medium
you need to increase InlineSmallCode, and for:
@ 16 java.lang.Integer::intValue inlining too deep
you, obviously, have to increase MaxInlineLevel (note: this switch is
only available in debug builds).
The need for this tweaking will go away in the future, but for now, if
you want to get the whole call path inlined (which may not have the best
performance), you have to use some switches.
Of course I want feedback about crashes! Preferably with small
More information about the mlvm-dev