Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 21 additions & 140 deletions substratevm/mx.substratevm/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,17 @@
"requires" : [
"java.instrument",
],
"requiresConcealed" : {
"java.base" : ["jdk.internal.module"],
},
"javaCompliance": "11+",
"annotationProcessors": [
"compiler:GRAAL_PROCESSOR",
],
"checkstyle": "com.oracle.svm.core",
"workingSets": "SVM",
},

"com.oracle.svm.common": {
"subDir": "src",
"sourceDirs": ["src"],
Expand All @@ -167,23 +171,6 @@
"checkstyle": "com.oracle.svm.core",
"workingSets": "SVM",
},
"com.oracle.svm.util.jdk11": {
"subDir": "src",
"sourceDirs": ["src"],
"dependencies": [
"com.oracle.svm.util",
],
"requires" : ["java.instrument"],
"requiresConcealed" : {
"java.base" : ["jdk.internal.module"],
},
"javaCompliance": "11+",
"annotationProcessors": [
"compiler:GRAAL_PROCESSOR",
],
"checkstyle": "com.oracle.svm.core",
"workingSets": "SVM",
},

"com.oracle.svm.core": {
"subDir": "src",
Expand All @@ -199,6 +186,7 @@
"java.scripting",
"jdk.management",
"jdk.unsupported",
"java.compiler",
],
"requiresConcealed" : {
"java.base" : [
Expand All @@ -214,6 +202,14 @@
"sun.util.calendar",
"sun.util.locale.provider",
"sun.util.resources",
"jdk.internal.module",
"jdk.internal.reflect",
"jdk.internal.misc",
"jdk.internal.logger",
"jdk.internal.loader",
"sun.text.spi",
"jdk.internal.perf",
"jdk.internal.loader"
],
"java.desktop": [
"sun.java2d",
Expand Down Expand Up @@ -241,38 +237,11 @@
"spotbugs": "false",
},

"com.oracle.svm.core.jdk11": {
"subDir": "src",
"sourceDirs": ["src"],
"dependencies": ["com.oracle.svm.core"],
"requires" : [
"java.logging",
"jdk.unsupported",
"java.compiler",
],
"requiresConcealed" : {
"java.base" : [
"jdk.internal.module",
"jdk.internal.reflect",
"jdk.internal.misc",
"jdk.internal.logger",
"jdk.internal.loader",
"sun.util.resources",
"sun.text.spi",
"jdk.internal.perf",
"sun.util.locale.provider",
"jdk.internal.loader"
],
},
"javaCompliance": "11+",
"checkstyle": "com.oracle.svm.core",
"workingSets": "SVM",
},

"com.oracle.svm.core.jdk17": {
"subDir": "src",
"sourceDirs": ["src"],
"dependencies": ["com.oracle.svm.core.jdk11"],
"dependencies": ["com.oracle.svm.core"],
"requiresConcealed" : {
"java.base" : [
"jdk.internal.access.foreign",
Expand Down Expand Up @@ -426,6 +395,7 @@
],
"workingSets": "SVM",
},

"com.oracle.svm.hosted": {
"subDir": "src",
"sourceDirs": ["src"],
Expand All @@ -452,9 +422,12 @@
"sun.security.x509",
"sun.util.locale.provider",
"sun.util.resources",
"jdk.internal.module",
"sun.text.spi",
],
"jdk.internal.vm.ci" : [
"jdk.vm.ci.runtime",
"jdk.vm.ci.meta",
],
},
"javaCompliance": "11+",
Expand All @@ -465,29 +438,6 @@
"workingSets": "SVM",
},

"com.oracle.svm.hosted.jdk11": {
"subDir": "src",
"sourceDirs": ["src"],
"dependencies": [
"com.oracle.svm.hosted",
"com.oracle.svm.core.jdk11"
],
"requires" : ["java.instrument"],
"requiresConcealed" : {
"jdk.internal.vm.ci": ["jdk.vm.ci.meta"],
"java.base": [
"jdk.internal.module",
"sun.text.spi",
"sun.util.resources"
],
},
"javaCompliance": "11+",
"checkstyle" : "com.oracle.svm.hosted",
"annotationProcessors": [
"compiler:GRAAL_PROCESSOR",
],
"workingSets": "SVM",
},
"com.oracle.svm.hosted.jdk17": {
"subDir": "src",
"sourceDirs": ["src"],
Expand Down Expand Up @@ -706,20 +656,6 @@
"spotbugs": "false",
},

"com.oracle.svm.driver.jdk11": {
"subDir": "src",
"sourceDirs": [
"src",
],
"checkstyle": "com.oracle.svm.driver",
"workingSets": "SVM",
"annotationProcessors": [
"compiler:GRAAL_PROCESSOR",
],
"javaCompliance" : "11+",
"spotbugs": "false",
},

"com.oracle.svm.junit": {
"subDir": "src",
"sourceDirs": [
Expand Down Expand Up @@ -748,7 +684,9 @@
"SVM",
],
"requires": [
"jdk.unsupported"
"jdk.unsupported",
"java.compiler",
"jdk.jfr",
],
"requiresConcealed": {
"java.base": [
Expand All @@ -764,28 +702,6 @@
"spotbugs": "false",
},

"com.oracle.svm.test.jdk11": {
"subDir": "src",
"sourceDirs": ["src"],
"dependencies": [
"mx:JUNIT_TOOL",
"sdk:GRAAL_SDK",
"SVM",
],
"requires" : [
"java.compiler",
"jdk.jfr",
],
"checkstyle": "com.oracle.svm.core",
"workingSets": "SVM",
"annotationProcessors": [
"compiler:GRAAL_PROCESSOR",
],
"javaCompliance": "11+",
"spotbugs": "false",
"testProject": True,
},

"com.oracle.svm.configure.test": {
"subDir": "src",
"sourceDirs": ["src"],
Expand Down Expand Up @@ -1092,22 +1008,6 @@
"spotbugs": "false",
},

"com.oracle.svm.configure.jdk11": {
"subDir": "src",
"sourceDirs": [
"src",
],
"dependencies": [
"com.oracle.svm.configure",
],
"checkstyle": "com.oracle.svm.driver",
"workingSets": "SVM",
"annotationProcessors": [
],
"javaCompliance": "11+",
"spotbugs": "false",
},

"com.oracle.svm.jvmtiagentbase": {
"subDir": "src",
"sourceDirs": [
Expand Down Expand Up @@ -1192,10 +1092,8 @@
"com.oracle.svm.graal",
"com.oracle.svm.truffle",
"com.oracle.svm.hosted",
"com.oracle.svm.hosted.jdk11",
"com.oracle.svm.hosted.jdk17",
"com.oracle.svm.core",
"com.oracle.svm.core.jdk11",
"com.oracle.svm.core.jdk17",
"com.oracle.svm.core.graal.amd64",
"com.oracle.svm.core.graal.aarch64",
Expand Down Expand Up @@ -1451,7 +1349,6 @@
"mainClass": "com.oracle.svm.driver.NativeImage",
"dependencies": [
"com.oracle.svm.driver",
"com.oracle.svm.driver.jdk11",
"svm-compiler-flags-builder",
],
"distDependencies": [
Expand Down Expand Up @@ -1525,7 +1422,6 @@
"mainClass": "com.oracle.svm.configure.ConfigurationTool",
"dependencies": [
"com.oracle.svm.configure",
"com.oracle.svm.configure.jdk11",
],
"distDependencies": [
"LIBRARY_SUPPORT",
Expand All @@ -1545,7 +1441,6 @@
"dependencies": [
"com.oracle.svm.common",
"com.oracle.svm.util",
"com.oracle.svm.util.jdk11",
],
"distDependencies": [
"compiler:GRAAL",
Expand Down Expand Up @@ -1627,20 +1522,6 @@
"testDistribution" : True,
},

"SVM_TESTS_JDK11" : {
"subDir": "src",
"relpath" : True,
"dependencies" : [
"com.oracle.svm.test.jdk11",
],
"distDependencies": [
"mx:JUNIT_TOOL",
"SVM",
],
"javaCompliance": "11+",
"testDistribution" : True,
},

"POLYGLOT_NATIVE_API" : {
"subDir": "src",
"dependencies": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@
import com.oracle.svm.core.annotate.AutomaticFeature;
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
import com.oracle.svm.core.annotate.TargetElement;
import com.oracle.svm.core.headers.LibC;
import com.oracle.svm.core.jdk.JDK11OrLater;
import com.oracle.svm.core.jdk.JDK8OrEarlier;
import com.oracle.svm.core.jdk.RuntimeSupport;
import com.oracle.svm.core.log.Log;
import com.oracle.svm.core.os.IsDefined;
Expand All @@ -72,14 +69,7 @@ public String apply(TargetClass annotation) {
final class Target_jdk_internal_misc_Signal {

@Substitute
@TargetElement(onlyWith = JDK8OrEarlier.class)
private static /* native */ int findSignal(String signalName) {
return Util_jdk_internal_misc_Signal.numberFromName(signalName);
}

@Substitute
@TargetElement(onlyWith = JDK11OrLater.class)
private static /* native */ int findSignal0(String signalName) {
private static int findSignal0(String signalName) {
return Util_jdk_internal_misc_Signal.numberFromName(signalName);
}

Expand Down Expand Up @@ -416,7 +406,7 @@ public void run() {
}
}

@TargetClass(className = "jdk.internal.misc.VM", onlyWith = JDK11OrLater.class)
@TargetClass(className = "jdk.internal.misc.VM")
final class Target_jdk_internal_misc_VM {

/* Implementation from src/hotspot/share/prims/jvm.cpp#L286 translated to Java. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@
import com.oracle.svm.core.annotate.TargetElement;
import com.oracle.svm.core.annotate.Uninterruptible;
import com.oracle.svm.core.annotate.UnknownClass;
import com.oracle.svm.core.jdk.JDK11OrLater;
import com.oracle.svm.core.jdk.JDK17OrLater;
import com.oracle.svm.core.jdk.JDK17_0_2OrLater;
import com.oracle.svm.core.jdk.JDK8OrEarlier;
import com.oracle.svm.core.util.VMError;
import com.oracle.svm.util.ReflectionUtil;

Expand Down Expand Up @@ -159,45 +157,17 @@ boolean refersTo0(Object obj) {
@KeepOriginal
native boolean isEnqueued();

@Substitute
@TargetElement(onlyWith = JDK8OrEarlier.class)
@SuppressWarnings("unused")
static boolean tryHandlePending(boolean waitForNotify) {
/*
* This method in JDK 8 was replaced by waitForReferenceProcessing in JDK 11. On JDK 8, it
* helped with reference handling by handling a single reference (if one is available). The
* only caller (apart from the reference handling thread itself) in the JDK is
* `Bits.reserveMemory`, which passes `false` as the parameter `waitForNotify`. So our
* substitution, which always waits, is a considerable change in semantics. However, since
* `Bits.reserveMemory` did not change much between JDK 8 and JDK 11, this is OK.
*/
try {
return ReferenceInternals.waitForReferenceProcessing();
} catch (InterruptedException ex) {
Thread.currentThread().interrupt();
/*
* The caller might loop until "there is no more progress", i.e., until this method
* returns false. So returning true could lead to an infinite loop in the caller that is
* not interruptible.
*/
return false;
}
}

/** May be used by {@code JavaLangRefAccess} via {@code SharedSecrets}. */
@Substitute
@TargetElement(onlyWith = JDK11OrLater.class)
static boolean waitForReferenceProcessing() throws InterruptedException {
return ReferenceInternals.waitForReferenceProcessing();
}

@Override
@KeepOriginal //
@TargetElement(onlyWith = JDK11OrLater.class) //
protected native Object clone() throws CloneNotSupportedException;

@Substitute //
@TargetElement(onlyWith = JDK11OrLater.class) //
@SuppressWarnings("unused")
static void reachabilityFence(Object ref) {
GraalDirectives.blackhole(ref);
Expand Down
Loading