raffaello.giulietti at gmail.com
Wed Aug 19 06:41:26 PDT 2009
Raffaello Giulietti wrote:
> Christian Thalinger wrote:
>> Raffaello Giulietti wrote:
>>> * Is there a special -XX: flag to turn on inlining of methods invoked
>>> via method handles?
>>> * Or must something be enabled during the build of mlvm?
>> No, inlining is enabled by default. Currently only DMH invokes are
>> inlined, but I'm working on inlining the rest. Are you missing specific
> I'm experimenting with the implementation of a Smalltalk-like language.
> I'm using invokedynamic that targets a trivial stub that dispatches over
> the receiver's type which finally invokes a DMH.
> A simple test shows a factor of 150-200 with respect to an ordinary
> invokevirtual. That is, my Smalltalkish method invocation
> implementation, although seemingly trivial, is about 2 orders of
> magnitudes slower than Java's :-( That's why I'm wondering if inlining
> is at work.
Christian, your worries were well founded.
In fact, the target handler of the invokedynamic was not a direct MH but
a bound MH, instead. I forgot about my own implementation :-(
I have know refactored the code to make use of DMHs by storing the bound
argument in an accessible location and passing it explicitly as an
argument to invokedynamic. Unfortunately, I get:
# A fatal error has been detected by the Java Runtime Environment:
# Internal Error (sharedRuntime.cpp:590), pid=3632, tid=3072932752
# Error: guarantee(cb->is_adapter_blob(),"exception happened outside
interpreter, nmethods and vtable stubs (1)")
# JRE version: 7.0
# Java VM: OpenJDK Server VM (16.0-b06 mixed mode linux-x86 )
A similar crash happens with -Xint enabled.
Is this issue known?
More information about the mlvm-dev