mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8245717: VM option "-XX:EnableJVMCIProduct" could not be repetitively enabled
Reviewed-by: dholmes, kvn
This commit is contained in:
parent
00f223e22f
commit
1adecc8e3a
2 changed files with 9 additions and 1 deletions
|
@ -3042,6 +3042,10 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
|
||||||
return JNI_EINVAL;
|
return JNI_EINVAL;
|
||||||
}
|
}
|
||||||
} else if (match_option(option, "-XX:+EnableJVMCIProduct")) {
|
} 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");
|
JVMFlag *jvmciFlag = JVMFlag::find_flag("EnableJVMCIProduct");
|
||||||
// Allow this flag if it has been unlocked.
|
// Allow this flag if it has been unlocked.
|
||||||
if (jvmciFlag != NULL && jvmciFlag->is_unlocked()) {
|
if (jvmciFlag != NULL && jvmciFlag->is_unlocked()) {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 8235539
|
* @bug 8235539 8245717
|
||||||
* @summary Tests effect of -XX:+EnableJVMCIProduct on EnableJVMCI and UseJVMCICompiler
|
* @summary Tests effect of -XX:+EnableJVMCIProduct on EnableJVMCI and UseJVMCICompiler
|
||||||
* @requires vm.jvmci
|
* @requires vm.jvmci
|
||||||
* @library /test/lib
|
* @library /test/lib
|
||||||
|
@ -65,6 +65,10 @@ public class TestEnableJVMCIProduct {
|
||||||
test("-XX:-EnableJVMCI",
|
test("-XX:-EnableJVMCI",
|
||||||
new Expectation("EnableJVMCI", "false", "command line"),
|
new Expectation("EnableJVMCI", "false", "command line"),
|
||||||
new Expectation("UseJVMCICompiler", "false", "default"));
|
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 {
|
static void test(String explicitFlag, Expectation... expectations) throws Exception {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue