RFR(XS) : 8159149 : Several compiler tests fail with minimal VM

Igor Ignatyev igor.ignatyev at oracle.com
Thu Jun 16 13:27:15 UTC 2016

> 70 lines changed: 4 ins; 1 del; 65 mod; 

Hi all,

could you please review the fix for a couple of compiler tests to make it possible to run them on minimal VM or exclude them if they are not applicable?

minimal VM doesn’t have several features such as jcmd, instrumentation agents and support only which is in java.compact2 module. 
 - compiler/c2/8004867/TestIntUnsafeOrdered.java and compiler/codegen/8011901/Test8011901.java used sun.misc.Unsafe which is in jdk.unsupported module which is not in java.compact2 set, they tests were rewritten to use jdk.internal.misc.Unsafe instead.
 - compiler/jsr292/NonInlinedCall/RedefineTest.java uses instrumentation agent, compiler/compilercontrol/jcmd/PrintDirectivesTest.java uses jcmd, these features are not supported in minimal VM, the corresponding @requiers was added to exclude the tests
 - compiler/compilercontrol/mixed/RandomValidCommandsTest.java and compiler/compilercontrol/logcompilation/LogTest.java have indirect dependency on java.management module. this dependency is in driver code, not in test code, so converting ‘@run main’ to '@run driver’ makes it possible to run these tests on minimal VM. PS there is a plan to get rid of this dependency

JBS: https://bugs.openjdk.java.net/browse/JDK-8159149
webrev: http://cr.openjdk.java.net/~iignatyev/8159149/webrev.00/
testing: locally on macos w/ and w/o ‘-limitmods java.compact2’ and remotely on linux-x86 w/ ‘-minimal -limitmods java.compact2'

— Igor

More information about the hotspot-compiler-dev mailing list