Skip to content
Permalink
Browse files

8238758: [JVMCI] fix JVMCI jtreg events tests to work with GraalVM

Reviewed-by: kvn, dlong, never
  • Loading branch information
Doug Simon
Doug Simon committed Feb 14, 2020
1 parent 3bb62dc commit 8119f836bf73f11440c5ff6a6343ec11b8c80600
@@ -34,6 +34,7 @@
import jdk.vm.ci.runtime.JVMCIRuntime;
import jdk.vm.ci.services.JVMCIPermission;
import jdk.vm.ci.services.JVMCIServiceLocator;
import jdk.vm.ci.services.Services;

import static jdk.vm.ci.services.Services.IS_IN_NATIVE_IMAGE;

@@ -96,6 +97,11 @@ static JVMCICompilerFactory getCompilerFactory() {
}
}
if (factory == null) {
if (Services.IS_IN_NATIVE_IMAGE) {
throw new JVMCIError("JVMCI compiler '%s' not found in JVMCI native library.%n" +
"Use -XX:-UseJVMCINativeLibrary when specifying a JVMCI compiler available on a class path with %s.",
compilerName, Option.Compiler.getPropertyName());
}
throw new JVMCIError("JVMCI compiler '%s' not found", compilerName);
}
}
@@ -47,12 +47,12 @@
* compiler.jvmci.common.JVMCIHelpers$EmptyVMEventListener
* @run main/othervm -XX:+UnlockExperimentalVMOptions
* -Djvmci.Compiler=EmptyCompiler -Xbootclasspath/a:.
* -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI
* -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI -XX:-UseJVMCINativeLibrary
* -Dcompiler.jvmci.events.JvmciNotifyBootstrapFinishedEventTest.bootstrap=false
* compiler.jvmci.events.JvmciNotifyBootstrapFinishedEventTest
* @run main/othervm -XX:+UnlockExperimentalVMOptions
* -Djvmci.Compiler=EmptyCompiler -Xbootclasspath/a:.
* -XX:+UseJVMCICompiler -XX:+BootstrapJVMCI
* -XX:+UseJVMCICompiler -XX:+BootstrapJVMCI -XX:-UseJVMCINativeLibrary
* -Dcompiler.jvmci.events.JvmciNotifyBootstrapFinishedEventTest.bootstrap=true
* compiler.jvmci.events.JvmciNotifyBootstrapFinishedEventTest
*/
@@ -48,11 +48,12 @@
* compiler.jvmci.common.JVMCIHelpers$EmptyVMEventListener
* @run main/othervm -XX:+UnlockExperimentalVMOptions
* -Djvmci.Compiler=EmptyCompiler -Xbootclasspath/a:.
* -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI
* -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI -XX:-UseJVMCINativeLibrary
* compiler.jvmci.events.JvmciNotifyInstallEventTest
* @run main/othervm -XX:+UnlockExperimentalVMOptions
* -Djvmci.Compiler=EmptyCompiler -Xbootclasspath/a:.
* -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI -XX:JVMCINMethodSizeLimit=0
* -XX:-UseJVMCINativeLibrary
* compiler.jvmci.events.JvmciNotifyInstallEventTest
*/

@@ -43,7 +43,8 @@
* compiler.jvmci.common.JVMCIHelpers$EmptyCompilationRequestResult
* compiler.jvmci.common.JVMCIHelpers$EmptyVMEventListener
* compiler.jvmci.events.JvmciShutdownEventListener
* @run main/othervm compiler.jvmci.events.JvmciShutdownEventTest
* @run main/othervm -XX:+UnlockExperimentalVMOptions
* compiler.jvmci.events.JvmciShutdownEventTest
*/

package compiler.jvmci.events;
@@ -66,7 +67,7 @@ public static void main(String args[]) throws Throwable {
"Unexpected exit code with +EnableJVMCI",
"Unexpected output with +EnableJVMCI", ExitCode.OK,
addTestVMOptions, "-XX:+UnlockExperimentalVMOptions",
"-XX:+EnableJVMCI", "-Xbootclasspath/a:.",
"-XX:+EnableJVMCI", "-XX:-UseJVMCICompiler", "-Xbootclasspath/a:.",
JvmciShutdownEventListener.class.getName()
);

0 comments on commit 8119f83

Please sign in to comment.