Skip to content

Commit b3ec483

Browse files
committed
[GR-14476] Update to jvmci-0.57.
PullRequest: graal/3229
2 parents 7dbb0c5 + d71d642 commit b3ec483

File tree

4 files changed

+22
-21
lines changed

4 files changed

+22
-21
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jdk:
1818

1919
env:
2020
global:
21-
- JVMCI_VERSION="jvmci-0.56"
21+
- JVMCI_VERSION="jvmci-0.57"
2222
- JDK8_UPDATE_VERSION="202"
2323

2424
matrix:

common.hocon

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ overlay = a91034428f121e5bc501872343445e4339e95073
66
# openjdk8 JDKs on Linux are built by Oracle Labs
77
# openjdk8 JDKs on macOS are based on AdoptOpenJDK binaries
88
jdks: {
9-
labsjdk8: {name : labsjdk, version : "8u202-jvmci-0.56", platformspecific: true}
10-
openjdk8: {name : openjdk, version : "8u202-jvmci-0.56", platformspecific: true}
11-
labsjdk8Debug: {name : labsjdk, version : "8u202-jvmci-0.56-fastdebug", platformspecific: true}
9+
labsjdk8: {name : labsjdk, version : "8u202-jvmci-0.57", platformspecific: true}
10+
openjdk8: {name : openjdk, version : "8u202-jvmci-0.57", platformspecific: true}
11+
labsjdk8Debug: {name : labsjdk, version : "8u202-jvmci-0.57-fastdebug", platformspecific: true}
1212
oraclejdk11: {name : oraclejdk, version : "11+28", platformspecific: true}
1313
openjdk11: {name : openjdk, version : "11+28", platformspecific: true}
1414

compiler/src/org.graalvm.compiler.hotspot.jdk8/src/org/graalvm/compiler/hotspot/IsGraalPredicate.java

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,34 @@
2424
*/
2525
package org.graalvm.compiler.hotspot;
2626

27-
import static jdk.vm.ci.hotspot.HotSpotJVMCICompilerFactory.CompilationLevelAdjustment.ByHolder;
2827
import static jdk.vm.ci.hotspot.HotSpotJVMCICompilerFactory.CompilationLevelAdjustment.None;
2928

29+
import org.graalvm.compiler.debug.GraalError;
30+
3031
import jdk.vm.ci.hotspot.HotSpotJVMCICompilerFactory.CompilationLevelAdjustment;
32+
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;
3133

3234
/**
3335
* Determines if a given class is a JVMCI or Graal class for the purpose of
3436
* {@link HotSpotGraalCompilerFactory.Options#CompileGraalWithC1Only}.
3537
*/
3638
class IsGraalPredicate extends IsGraalPredicateBase {
37-
private final ClassLoader jvmciLoader = getClass().getClassLoader();
39+
40+
@Override
41+
void onCompilerConfigurationFactorySelection(HotSpotJVMCIRuntime runtime, CompilerConfigurationFactory factory) {
42+
ClassLoader jvmciLoader = getClass().getClassLoader();
43+
if (jvmciLoader != null) {
44+
runtime.excludeFromJVMCICompilation(jvmciLoader);
45+
}
46+
}
3847

3948
@Override
4049
CompilationLevelAdjustment getCompilationLevelAdjustment() {
41-
return jvmciLoader != null ? ByHolder : None;
50+
return None;
4251
}
4352

4453
@Override
4554
boolean apply(Class<?> declaringClass) {
46-
assert jvmciLoader != null;
47-
// When running with +UseJVMCIClassLoader all classes loaded
48-
// by the JVMCI loader are considered to be Graal classes.
49-
try {
50-
if (declaringClass.getClassLoader() == jvmciLoader) {
51-
return true;
52-
}
53-
} catch (SecurityException e) {
54-
// This is definitely not a JVMCI or Graal class
55-
}
56-
return false;
55+
throw GraalError.shouldNotReachHere();
5756
}
5857
}

compiler/src/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
*/
4242
class JVMCIVersionCheck {
4343

44-
// 0.55 introduces new HotSpotSpeculationLog API
44+
// 0.57 introduces HotSpotJVMCIRuntime.excludeFromJVMCICompilation
4545
private static final int JVMCI8_MIN_MAJOR_VERSION = 0;
46-
private static final int JVMCI8_MIN_MINOR_VERSION = 55;
46+
private static final int JVMCI8_MIN_MINOR_VERSION = 57;
4747

4848
private static void failVersionCheck(Map<String, String> props, boolean exit, String reason, Object... args) {
4949
Formatter errorMessage = new Formatter().format(reason, args);
@@ -54,7 +54,9 @@ private static void failVersionCheck(Map<String, String> props, boolean exit, St
5454
errorMessage.format("Currently used Java home directory is %s.%n", javaHome);
5555
errorMessage.format("Currently used VM configuration is: %s%n", vmName);
5656
if (props.get("java.specification.version").compareTo("1.9") < 0) {
57-
errorMessage.format("Download the latest JVMCI JDK 8 from http://www.oracle.com/technetwork/oracle-labs/program-languages/downloads/index.html");
57+
errorMessage.format("Download the latest JVMCI JDK 8 from " +
58+
"http://www.oracle.com/technetwork/oracle-labs/program-languages/downloads/index.html or " +
59+
"https://github.com/graalvm/openjdk8-jvmci-builder/releases");
5860
} else {
5961
errorMessage.format("Download JDK 11 or later.");
6062
}

0 commit comments

Comments
 (0)