JVMCI uses a constraint function to make sure you can't turn on certain flags without another being turned on:
Flag::Error EnableJVMCIMustBeEnabledConstraintFunc(bool value, bool verbose) {
if (!EnableJVMCI) {
if (verbose == true) {
jio_fprintf(defaultStream::error_stream(), "EnableJVMCI must be enabled\n");
}
return Flag::VIOLATES_CONSTRAINT;
} else {
return Flag::SUCCESS;
}
}
But it doesn't work as expected:
cthaling@macbook:~/ws/jdk9/hs-comp$ ./build/macosx-x86_64-normal-server-release/jdk/bin/java -XX:+UnlockExperimentalVMOptions -XX:-EnableJVMCI -XX:+UseJVMCICompiler
EnableJVMCI must be enabled
Improperly specified VM option 'UseJVMCICompiler'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
cthaling@macbook:~/ws/jdk9/hs-comp$ ./build/macosx-x86_64-normal-server-release/jdk/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler -XX:-EnableJVMCI
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000110218778, pid=92084, tid=5891
#
# JRE version: Java(TM) SE Runtime Environment (9.0) (build 9-internal+0-2015-12-08-103439.cthaling.hs-comp)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (9-internal+0-2015-12-08-103439.cthaling.hs-comp, mixed mode, tiered, jvmci compiler, compressed oops, g1 gc, bsd-amd64)
# Problematic frame:
# V [libjvm.dylib+0x218778]
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/cthaling/ws/jdk9/hs-comp/hs_err_pid92084.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Abort trap: 6