some of the jdk/test/java/lang/invoke tests still use -XX:+EnableInvokeDynamic

John Rose john.r.rose at
Fri Apr 15 08:52:33 PDT 2011

On Apr 15, 2011, at 6:42 AM, Christian Thalinger wrote:

> On Apr 15, 2011, at 3:12 PM, Stephen Bannasch wrote:
>> After I successfully bsd-port build (and after I see if java can start and display it's version number) I first run the 
>> jdk/test/java/lang/String tests with jtreg as a second-level smoketest:
>>  $ jtreg -jdk:build/bsd-amd64/j2sdk-image  -v:summary jdk/test/java/lang/String
>> These all pass.
>> But there appear to be errors running the jdk/test/java/lang/invoke/ tests.
>> Some of them add -XX:+EnableInvokeDynamic when run but this is no longer a valid option.
>> $ jtreg -XX:+UnlockExperimentalVMOptions -jdk:build/bsd-amd64/j2sdk-image  -v:summary jdk/test/java/lang/invoke/
>> Directory "JTwork" not found: creating
>> Directory "JTwork/scratch" not found: creating
>> FAILED: java/lang/invoke/6987555/
>> FAILED: java/lang/invoke/6991596/
>> Passed: java/lang/invoke/
>> FAILED: java/lang/invoke/
>> Passed: java/lang/invoke/
>> Passed: java/lang/invoke/
>> Passed: java/lang/invoke/
>> Passed: java/lang/invoke/
>> Test results: passed: 5; failed: 3
>> Report written to JTreport/html/report.html
>> Results written to /Users/stephen/dev/java/src/bsd/JTwork
>> Here's a bit of the detail for:
>> command: main -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic indify.Indify --verify-specifier-count=3 
>> --transitionalJSR292=false --expand-properties --classpath ${test.classes} --java 
>> --check-output
>> reason: User specified action: run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic indify.Indify 
>> --verify-specifier-count=3 --transitionalJSR292=false --expand-properties --classpath ${test.classes} --java 
>> --check-output
>> elapsed time (seconds): 0.01
>> ----------System.out:(0/0)----------
>> ----------System.err:(3/154)----------
>> Unrecognized VM option '+EnableInvokeDynamic'
>> Error: Could not create the Java Virtual Machine.
>> Error: A fatal exception has occurred. Program will exit.
> EnableInvokeDynamic has become a diagnostic switch, that's why it's not recognized.

Stephen, you could add "-XX:+UnlockDiagnosticVMOptions" to "jtreg -XX:+UnlockExperimentalVMOptions".  But neither of those extra options should be needed at this point.  Also, in JDK 7, EnableInvokeDynamic should be on by default.

> It seems we haven't updated the tests yet.

At least some of the tests (I hope all of them) are updated in meth-enable-6817525.patch.

Stephen, I'm puzzled that InvokeDynamicPrintArgs would fail with that message, since the EnableInvokeDynamic option has been  deleted.  See lines 36-40 of this file:

The transcript quoted above suggests that this patch has not been applied.

-- John

More information about the bsd-port-dev mailing list