Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8245717: VM option "-XX:EnableJVMCIProduct" could not be repetitively…
… enabled

Reviewed-by: dholmes, kvn
  • Loading branch information
Xiaohong Gong committed Jun 2, 2020
1 parent 00f223e commit 1adecc8e3ab60d2f51ad3e75395fe53956a61956
Showing with 9 additions and 1 deletion.
  1. +4 −0 src/hotspot/share/runtime/arguments.cpp
  2. +5 −1 test/hotspot/jtreg/compiler/jvmci/TestEnableJVMCIProduct.java
@@ -3042,6 +3042,10 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
return JNI_EINVAL;
}
} else if (match_option(option, "-XX:+EnableJVMCIProduct")) {
// Just continue, since "-XX:+EnableJVMCIProduct" has been specified before
if (EnableJVMCIProduct) {
continue;
}
JVMFlag *jvmciFlag = JVMFlag::find_flag("EnableJVMCIProduct");
// Allow this flag if it has been unlocked.
if (jvmciFlag != NULL && jvmciFlag->is_unlocked()) {
@@ -23,7 +23,7 @@

/*
* @test
* @bug 8235539
* @bug 8235539 8245717
* @summary Tests effect of -XX:+EnableJVMCIProduct on EnableJVMCI and UseJVMCICompiler
* @requires vm.jvmci
* @library /test/lib
@@ -65,6 +65,10 @@ public static void main(String[] args) throws Exception {
test("-XX:-EnableJVMCI",
new Expectation("EnableJVMCI", "false", "command line"),
new Expectation("UseJVMCICompiler", "false", "default"));
test("-XX:+EnableJVMCIProduct",
new Expectation("EnableJVMCIProduct", "true", "command line"),
new Expectation("EnableJVMCI", "true", "default"),
new Expectation("UseJVMCICompiler", "true", "default"));
}

static void test(String explicitFlag, Expectation... expectations) throws Exception {

0 comments on commit 1adecc8

Please sign in to comment.