still no fun with invokedynamic
Jochen Theodorou
blackdrag at gmx.org
Wed Sep 9 11:55:44 PDT 2009
Jochen Theodorou schrieb:
> Rémi Forax schrieb:
>> Le 09/09/2009 20:42, Jochen Theodorou a écrit :
>>> hi all,
>>>
>>> I am in urgend need of an actual VM with MethodHandles, but this is as
>>> always quuite complicated. This time I created a chroot envrionment for
>>> 32 bit, that was where I last time had to stop. I managed to get it
>>> compiled by the patch that was provided here 5 months ago and finally
>>> had a VM to run. So I did:
>>>
>>> davinci/sources/jdk/build/linux-i586/bin/java
>>> -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles
>>> -XX:+EnableInvokeDynamic FidgetDemo
>>>
>>> and got:
>>>
>>>> #
>>>> # A fatal error has been detected by the Java Runtime Environment:
>>>> #
>>>> # Internal Error (methodHandles.cpp:98), pid=8548, tid=4149795728
>>>> # Error: guarantee(z&& EnableMethodHandles,"can only enable once, and only if -XX:+EnableMethodHandles")
>>>> #
>>>> # JRE version: 7.0
>>>> # Java VM: OpenJDK Client VM (16.0-b08 mixed mode linux-x86 )
>>>> # An error report file with more information is saved as:
>>>> # /tmp/t/hs_err_pid8548.log
>>>> #
>>>> # If you would like to submit a bug report, please visit:
>>>> # http://java.sun.com/webapps/bugreport/crash.jsp
>>>> # The crash happened outside the Java Virtual Machine in native code.
>>>> # See problematic frame for where to report the bug.
>>>> #
>>>> Aborted
>>>>
>>> No idea why this fails like this. What I now need is either a workaround
>>> for this problem here, or a running JVM with method handles that I can
>>> download somewhere. As long as it is linux it should be fine, whatever
>>> it is.
>>>
>>> Who can help me here?
>>>
>> Hi jochen,
>> just try to remove -XX:+EnableMethodHandles.
>>
>> This line works for me:
>>
>> davinci/sources/jdk/build/linux-i586/bin/java
>> -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic FidgetDemo
>
>
> java -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles FidgetDemo
> OpenJDK Server VM warning: JSR 292 invokedynamic is disabled in this
> JVM. Use -XX:+EnableInvokeDynamic to enable.
> Fidgety self-modifying call site...
> --- loop #0
> Exception in thread "main" java.lang.IncompatibleClassChangeError
> at FidgetDemo.main(FidgetDemo.java:13)
>
> doesn't look good
wrong one... still:
java -XX:+UnlockExperimentalVMOptions FidgetDemoOpenJDK Server VM
warning: JSR 292 method handles are disabled in this JVM. Use
-XX:+EnableMethodHandles to enable.
> Exception in thread "main" java.lang.UnsatisfiedLinkError: sun.dyn.MethodHandleNatives.getConstant(I)I
> at sun.dyn.MethodHandleNatives.getConstant(Native Method)
> at sun.dyn.MethodHandleNatives.<clinit>(MethodHandleNatives.java:125)
> at sun.dyn.MethodHandleImpl.init(MethodHandleImpl.java:113)
> at sun.dyn.MethodTypeImpl.initForm(MethodTypeImpl.java:375)
> at java.dyn.MethodType.makeImpl(MethodType.java:186)
> at java.dyn.MethodType.access$200(MethodType.java:51)
> at java.dyn.MethodType$1.makeImpl(MethodType.java:76)
> at sun.dyn.MethodTypeImpl.canonicalize(MethodTypeImpl.java:418)
> at sun.dyn.MethodTypeImpl.findForm(MethodTypeImpl.java:380)
> at sun.dyn.MethodTypeImpl.initForm(MethodTypeImpl.java:371)
> at java.dyn.MethodType.makeImpl(MethodType.java:186)
> at java.dyn.MethodType.make(MethodType.java:151)
> at sun.dyn.MethodHandleImpl.<clinit>(MethodHandleImpl.java:861)
> at sun.dyn.MethodTypeImpl.initForm(MethodTypeImpl.java:375)
> at java.dyn.MethodType.makeImpl(MethodType.java:186)
> at java.dyn.MethodType.access$200(MethodType.java:51)
> at java.dyn.MethodType$1.makeImpl(MethodType.java:76)
> at sun.dyn.MethodTypeImpl.canonicalize(MethodTypeImpl.java:418)
> at sun.dyn.MethodTypeImpl.findForm(MethodTypeImpl.java:380)
> at sun.dyn.MethodTypeImpl.initForm(MethodTypeImpl.java:371)
> at java.dyn.MethodType.makeImpl(MethodType.java:186)
> at java.dyn.MethodType.make(MethodType.java:135)
> at java.dyn.Linkage.<clinit>(Linkage.java:148)
> at FidgetDemo.<clinit>(FidgetDemo.java:68)
>
bye Jochen
--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/
More information about the mlvm-dev
mailing list