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

Reviewed-by: kvn, dlong, never
This commit is contained in:
Doug Simon 2020-02-14 09:25:43 -08:00
parent 3bb62dc0d8
commit 8119f836bf
4 changed files with 13 additions and 5 deletions

View File

@ -34,6 +34,7 @@ import jdk.vm.ci.runtime.JVMCICompilerFactory;
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 @@ final class HotSpotJVMCICompilerConfig {
}
}
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);
}
}

View File

@ -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
*/

View File

@ -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
*/

View File

@ -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 class JvmciShutdownEventTest {
"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()
);