Skip to content

Commit dff147b

Browse files
OracleLabsAutomationzapster
authored andcommitted
[GR-64700] Update labsjdk to 25+21-jvmci-b01
PullRequest: graal/20701
2 parents b188cdd + 304a9af commit dff147b

File tree

19 files changed

+108
-48
lines changed

19 files changed

+108
-48
lines changed

ci/common.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ local common_json = import "../common.json";
112112
"windows-jdk19": { packages+: { "devkit:VS2022-17.1.0+1": "==0" }},
113113
"windows-jdk20": { packages+: { "devkit:VS2022-17.1.0+1": "==0" }},
114114
"windows-jdk21": { packages+: { "devkit:VS2022-17.1.0+1": "==1" }},
115-
"windows-jdk-latest": { packages+: { "devkit:VS2022-17.6.5+1": "==0" }},
115+
"windows-jdk-latest": { packages+: { "devkit:VS2022-17.13.2+1": "==0" }},
116116
"windows-jdkLatest": self["windows-jdk-latest"],
117117
"linux-jdk17": { packages+: { "devkit:gcc11.2.0-OL6.4+1": "==0" }},
118118
"linux-jdk19": { packages+: { "devkit:gcc11.2.0-OL6.4+1": "==0" }},

common.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
1010
"jdks": {
11-
"galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+19-2256", "platformspecific": true, "extrabundles": ["static-libs"]},
11+
"galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+21-2525", "platformspecific": true, "extrabundles": ["static-libs"]},
1212

1313
"oraclejdk17": {"name": "jpg-jdk", "version": "17.0.7", "build_id": "jdk-17.0.7+8", "platformspecific": true, "extrabundles": ["static-libs"]},
1414
"labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.7+4-jvmci-23.1-b02", "platformspecific": true },
@@ -45,13 +45,13 @@
4545

4646
"oraclejdk23": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+37", "platformspecific": true, "extrabundles": ["static-libs"]},
4747

48-
"oraclejdk-latest": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+20", "platformspecific": true, "extrabundles": ["static-libs"]},
49-
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-25+20-jvmci-b01", "platformspecific": true },
50-
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-25+20-jvmci-b01-debug", "platformspecific": true },
51-
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-25+20-jvmci-b01-sulong", "platformspecific": true },
52-
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-25+20-jvmci-b01", "platformspecific": true },
53-
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-25+20-jvmci-b01-debug", "platformspecific": true },
54-
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-25+20-jvmci-b01-sulong", "platformspecific": true }
48+
"oraclejdk-latest": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+21", "platformspecific": true, "extrabundles": ["static-libs"]},
49+
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-25+21-jvmci-b01", "platformspecific": true },
50+
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-25+21-jvmci-b01-debug", "platformspecific": true },
51+
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-25+21-jvmci-b01-sulong", "platformspecific": true },
52+
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-25+21-jvmci-b01", "platformspecific": true },
53+
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-25+21-jvmci-b01-debug", "platformspecific": true },
54+
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-25+21-jvmci-b01-sulong", "platformspecific": true }
5555
},
5656

5757
"eclipse": {

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/JVMCIVersionCheck.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ public final class JVMCIVersionCheck {
5656
private static final Map<String, Map<String, Version>> JVMCI_MIN_VERSIONS = Map.of(
5757
"21", Map.of(DEFAULT_VENDOR_ENTRY, createLegacyVersion(23, 1, 33)),
5858
"25", Map.of(
59-
"Oracle Corporation", createLabsJDKVersion("25+20", 1),
60-
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("25+20", 1)));
59+
"Oracle Corporation", createLabsJDKVersion("25+21", 1),
60+
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("25+21", 1)));
6161
private static final int NA = 0;
6262
/**
6363
* Minimum Java release supported by Graal.

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/meta/UnimplementedGraalIntrinsics.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ public UnimplementedGraalIntrinsics(Architecture arch) {
130130
"com/sun/crypto/provider/ML_KEM.implKyberInverseNtt([S[S)I",
131131
"com/sun/crypto/provider/ML_KEM.implKyberNtt([S[S)I",
132132
"com/sun/crypto/provider/ML_KEM.implKyberNttMult([S[S[S[S)I");
133+
134+
add(toBeInvestigated, // @formatter:off
135+
// JDK-8353786: Migrate Vector API math library support to FFM API
136+
"jdk/internal/vm/vector/VectorSupport.libraryBinaryOp(JLjava/lang/Class;Ljava/lang/Class;ILjava/lang/String;Ljdk/internal/vm/vector/VectorSupport$VectorPayload;Ljdk/internal/vm/vector/VectorSupport$VectorPayload;Ljdk/internal/vm/vector/VectorSupport$BinaryOperation;)Ljdk/internal/vm/vector/VectorSupport$VectorPayload;",
137+
"jdk/internal/vm/vector/VectorSupport.libraryUnaryOp(JLjava/lang/Class;Ljava/lang/Class;ILjava/lang/String;Ljdk/internal/vm/vector/VectorSupport$Vector;Ljdk/internal/vm/vector/VectorSupport$UnaryOperation;)Ljdk/internal/vm/vector/VectorSupport$Vector;"
138+
// @formatter:on
139+
);
133140
}
134141

135142
add(ignore,

substratevm/mx.substratevm/testhello.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def test():
191191
exec_string = execute("backtrace")
192192
stacktrace_regex = [
193193
fr"#0{spaces_pattern}hello\.Hello::main{param_types_pattern} {arg_values_pattern} at hello/Hello\.java:{main_start:d}",
194-
fr"#1{spaces_pattern}({address_pattern} in )?java\.lang\.invoke\.LambdaForm\$DMH/s{hex_digits_pattern}::invokeStatic(Init)?{param_types_pattern} {arg_values_pattern}( at java/lang/invoke/{package_file_pattern}:[0-9]+)?",
194+
fr"#1{spaces_pattern}({address_pattern} in )?java\.lang\.invoke\.DirectMethodHandle\$Holder::invokeStatic(Init)?{param_types_pattern} {arg_values_pattern}( at java/lang/invoke/{package_file_pattern}:[0-9]+)?",
195195
fr"#2{spaces_pattern}({address_pattern} in )?com\.oracle\.svm\.core\.JavaMainWrapper::invokeMain{param_types_pattern} {arg_values_pattern} at {package_pattern}JavaMainWrapper\.java:[0-9]+",
196196
fr"#3{spaces_pattern}({address_pattern} in )?com\.oracle\.svm\.core\.JavaMainWrapper::runCore0{no_param_types_pattern} {no_arg_values_pattern} at {package_pattern}JavaMainWrapper\.java:[0-9]+",
197197
fr"#4{spaces_pattern}{address_pattern} in com\.oracle\.svm\.core\.JavaMainWrapper::runCore{no_param_types_pattern} {no_arg_values_pattern} at {package_pattern}JavaMainWrapper\.java:[0-9]+",
@@ -402,7 +402,7 @@ def test():
402402
stacktrace_regex = [
403403
fr"#0{spaces_pattern}hello\.Hello\$Greeter::greeter{param_types_pattern} {arg_values_pattern} at hello/Hello\.java:38",
404404
fr"#1{spaces_pattern}{address_pattern} in hello\.Hello::main{param_types_pattern} {arg_values_pattern} at hello/Hello\.java:{main_start:d}",
405-
fr"#2{spaces_pattern}({address_pattern} in )?java\.lang\.invoke\.LambdaForm\$DMH/s{hex_digits_pattern}::invokeStatic(Init)?{param_types_pattern} {arg_values_pattern}( at java/lang/invoke/{package_file_pattern}:[0-9]+)?",
405+
fr"#2{spaces_pattern}({address_pattern} in )?java\.lang\.invoke\.DirectMethodHandle\$Holder::invokeStatic(Init)?{param_types_pattern} {arg_values_pattern}( at java/lang/invoke/DirectMethodHandle.java:[0-9]+)?",
406406
fr"#3{spaces_pattern}({address_pattern} in )?com\.oracle\.svm\.core\.JavaMainWrapper::invokeMain{param_types_pattern} {arg_values_pattern} at {package_pattern}JavaMainWrapper\.java:[0-9]+",
407407
fr"#4{spaces_pattern}({address_pattern} in )?com\.oracle\.svm\.core\.JavaMainWrapper::runCore0{no_param_types_pattern} {no_arg_values_pattern} at {package_pattern}JavaMainWrapper\.java:[0-9]+",
408408
fr"#5{spaces_pattern}{address_pattern} in com\.oracle\.svm\.core\.JavaMainWrapper::runCore{no_param_types_pattern} {no_arg_values_pattern} at {package_pattern}JavaMainWrapper\.java:[0-9]+",

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/aarch64/AArch64LibCHelper.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2019, 2020, Arm Limited. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -131,6 +131,14 @@ public interface CPUFeatures extends PointerBase {
131131
@AllowNarrowingCast
132132
@CField
133133
boolean fSVEBITPERM();
134+
135+
@AllowNarrowingCast
136+
@CField
137+
boolean fFPHP();
138+
139+
@AllowNarrowingCast
140+
@CField
141+
boolean fASIMDHP();
134142
}
135143
// Checkstyle: resume
136144
}

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/c/locale/LocaleCHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class LocaleCHelper {
6161
@CFunction(value = "svm_initialize_locale", transition = NO_TRANSITION)
6262
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+17/src/java.base/unix/native/libjava/java_props_md.c#L71-L357")
6363
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+17/src/java.base/unix/native/libjava/java_props_md.c#L436-L460")
64-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">20/src/java.base/windows/native/libjava/java_props_md.c#L263-L716")
64+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">21/src/java.base/windows/native/libjava/java_props_md.c#L263-L721")
6565
static native int initializeLocale();
6666

6767
@CFunction(value = "svm_get_locale", transition = NO_TRANSITION)

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/container/ContainerLibrary.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,33 +60,33 @@
6060
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/os/linux/cgroupV2Subsystem_linux.hpp")
6161
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/os/linux/osContainer_linux.cpp")
6262
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/os/linux/osContainer_linux.hpp")
63-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">20/src/hotspot/os/linux/os_linux.cpp")
63+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">21/src/hotspot/os/linux/os_linux.cpp")
6464
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/os/linux/os_linux.hpp")
6565
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/os/linux/os_linux.inline.hpp")
6666
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/os/posix/include/jvm_md.h")
67-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">18/src/hotspot/os/posix/os_posix.cpp")
68-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">18/src/hotspot/os/posix/os_posix.hpp")
67+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">21/src/hotspot/os/posix/os_posix.cpp")
68+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">21/src/hotspot/os/posix/os_posix.hpp")
6969
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/os/posix/os_posix.inline.hpp")
7070
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/share/memory/allocation.hpp")
71-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">18/src/hotspot/share/memory/allocation.inline.hpp")
71+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">21/src/hotspot/share/memory/allocation.inline.hpp")
7272
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/share/memory/allStatic.hpp")
7373
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/share/nmt/memTag.hpp")
74-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">20/src/hotspot/share/runtime/os.cpp")
75-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">19/src/hotspot/share/runtime/os.hpp")
74+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">21/src/hotspot/share/runtime/os.cpp")
75+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">21/src/hotspot/share/runtime/os.hpp")
7676
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/share/runtime/os.inline.hpp")
7777
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/share/utilities/checkedCast.hpp")
78-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">18/src/hotspot/share/utilities/compilerWarnings_gcc.hpp")
79-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">18/src/hotspot/share/utilities/compilerWarnings.hpp")
78+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">21/src/hotspot/share/utilities/compilerWarnings_gcc.hpp")
79+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">21/src/hotspot/share/utilities/compilerWarnings.hpp")
8080
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/share/utilities/globalDefinitions_gcc.hpp")
81-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">20/src/hotspot/share/utilities/globalDefinitions.hpp")
82-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">18/src/hotspot/share/utilities/macros.hpp")
81+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">21/src/hotspot/share/utilities/globalDefinitions.hpp")
82+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">21/src/hotspot/share/utilities/macros.hpp")
8383
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/share/utilities/ostream.cpp")
84-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">18/src/hotspot/share/utilities/ostream.hpp")
84+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">21/src/hotspot/share/utilities/ostream.hpp")
8585
// The following annotations are for files in `src/svm`, which are completely customized for SVM
8686
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/share/logging/log.hpp")
8787
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/share/memory/allocation.cpp")
8888
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+19/src/hotspot/share/runtime/globals.hpp")
89-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">18/src/hotspot/share/utilities/debug.cpp")
89+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+%3Cspan%20class="x x-first x-last">21/src/hotspot/share/utilities/debug.cpp")
9090
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+18/src/hotspot/share/utilities/debug.hpp")
9191
public class ContainerLibrary {
9292
static final int VERSION = 240100;

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/heap/ReferenceInternals.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import java.lang.ref.Reference;
3131
import java.lang.ref.SoftReference;
3232

33+
import jdk.graal.compiler.serviceprovider.JavaVersionUtil;
3334
import org.graalvm.word.Pointer;
3435

3536
import com.oracle.svm.core.NeverInline;
@@ -161,7 +162,8 @@ public static <T> void setNextDiscovered(Reference<T> instance, Reference<?> new
161162
}
162163

163164
public static boolean hasQueue(Reference<?> instance) {
164-
return cast(instance).queue != Target_java_lang_ref_ReferenceQueue.NULL;
165+
return cast(instance).queue != (JavaVersionUtil.JAVA_SPEC > 21 ? Target_java_lang_ref_ReferenceQueue.NULL_QUEUE
166+
: Target_java_lang_ref_ReferenceQueue.NULL);
165167
}
166168

167169
/*
@@ -229,7 +231,8 @@ public static void processPendingReferences() {
229231
} else {
230232
@SuppressWarnings("unchecked")
231233
Target_java_lang_ref_ReferenceQueue<? super Object> queue = SubstrateUtil.cast(ref.queue, Target_java_lang_ref_ReferenceQueue.class);
232-
if (queue != Target_java_lang_ref_ReferenceQueue.NULL) {
234+
if (queue != (JavaVersionUtil.JAVA_SPEC > 21 ? Target_java_lang_ref_ReferenceQueue.NULL_QUEUE
235+
: Target_java_lang_ref_ReferenceQueue.NULL)) {
233236
// Enqueues, avoiding the potentially overridden Reference.enqueue().
234237
queue.enqueue(ref);
235238
}

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/heap/Target_java_lang_ref_Reference.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import java.lang.reflect.Field;
3030
import java.util.function.BooleanSupplier;
3131

32+
import jdk.graal.compiler.serviceprovider.JavaVersionUtil;
3233
import org.graalvm.nativeimage.Platform;
3334
import org.graalvm.nativeimage.Platforms;
3435
import org.graalvm.nativeimage.hosted.FieldValueTransformer;
@@ -119,7 +120,8 @@ public final class Target_java_lang_ref_Reference<T> {
119120
@Uninterruptible(reason = "The initialization of the fields must be atomic with respect to collection.")
120121
Target_java_lang_ref_Reference(T referent, Target_java_lang_ref_ReferenceQueue<? super T> queue) {
121122
this.referent = referent;
122-
this.queue = (queue == null) ? Target_java_lang_ref_ReferenceQueue.NULL : queue;
123+
this.queue = (queue == null) ? (JavaVersionUtil.JAVA_SPEC > 21 ? Target_java_lang_ref_ReferenceQueue.NULL_QUEUE
124+
: Target_java_lang_ref_ReferenceQueue.NULL) : queue;
123125
}
124126

125127
@KeepOriginal

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/heap/Target_java_lang_ref_ReferenceQueue.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,21 @@
3030
import com.oracle.svm.core.annotate.Alias;
3131
import com.oracle.svm.core.annotate.RecomputeFieldValue;
3232
import com.oracle.svm.core.annotate.TargetClass;
33+
import com.oracle.svm.core.annotate.TargetElement;
34+
import com.oracle.svm.core.jdk.JDK21OrEarlier;
35+
import com.oracle.svm.core.jdk.JDKLatest;
3336

3437
@TargetClass(ReferenceQueue.class)
3538
final class Target_java_lang_ref_ReferenceQueue<T> {
36-
@Alias static Target_java_lang_ref_ReferenceQueue<Object> NULL;
39+
// Checkstyle: stop
40+
@Alias //
41+
@TargetElement(onlyWith = JDKLatest.class) //
42+
static Target_java_lang_ref_ReferenceQueue<Object> NULL_QUEUE;
43+
// CheckStyle: resume
44+
45+
@Alias //
46+
@TargetElement(onlyWith = JDK21OrEarlier.class) //
47+
static Target_java_lang_ref_ReferenceQueue<Object> NULL;
3748

3849
@Alias @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Reset) //
3950
volatile Reference<? extends T> head;

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/Target_java_lang_Module.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public boolean isNativeAccessEnabled() {
7070
public native void ensureNativeAccess(Class<?> owner, String methodName, Class<?> currentClass, boolean jni);
7171

7272
@Substitute
73-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-%3Cspan%20class="x x-first x-last">24+22/src/hotspot/share/classfile/modules.cpp#L279-L478")
73+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-%3Cspan%20class="x x-first x-last">25+21/src/hotspot/share/classfile/modules.cpp#L279-L474")
7474
private static void defineModule0(Module module, boolean isOpen, String version, String location, Object[] pns) {
7575
ModuleNative.defineModule(module, isOpen, pns);
7676
}

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/Target_jdk_internal_vm_vector_VectorSupport.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
*/
2525
package com.oracle.svm.core.jdk;
2626

27+
import java.util.stream.Collectors;
28+
29+
import org.graalvm.nativeimage.ImageSingletons;
30+
2731
import com.oracle.svm.core.AlwaysInline;
32+
import com.oracle.svm.core.SubstrateTargetDescription;
2833
import com.oracle.svm.core.annotate.Alias;
2934
import com.oracle.svm.core.annotate.AnnotateOriginal;
3035
import com.oracle.svm.core.annotate.Delete;
@@ -33,6 +38,9 @@
3338
import com.oracle.svm.core.annotate.TargetClass;
3439
import com.oracle.svm.core.annotate.TargetElement;
3540

41+
import jdk.graal.compiler.api.replacements.Fold;
42+
import jdk.vm.ci.code.CPUFeatureName;
43+
3644
@TargetClass(className = "jdk.internal.vm.vector.VectorSupport")
3745
final class Target_jdk_internal_vm_vector_VectorSupport {
3846
@Delete
@@ -43,6 +51,24 @@ final class Target_jdk_internal_vm_vector_VectorSupport {
4351
private static int getMaxLaneCount(Class<?> etype) {
4452
return VectorAPISupport.singleton().getMaxLaneCount(etype);
4553
}
54+
55+
/**
56+
* Substitutes the native method with a constant string defined at build time.
57+
*/
58+
@Substitute
59+
@TargetElement(onlyWith = JDKLatest.class)
60+
public static String getCPUFeatures() {
61+
return Helper_jdk_internal_vm_vector_VectorSupport.getCPUFeatures();
62+
}
63+
}
64+
65+
final class Helper_jdk_internal_vm_vector_VectorSupport {
66+
@Fold
67+
public static String getCPUFeatures() {
68+
return ImageSingletons.lookup(SubstrateTargetDescription.class).arch.getFeatures().stream()
69+
.map(CPUFeatureName::name)
70+
.collect(Collectors.joining(","));
71+
}
4672
}
4773

4874
@TargetClass(className = "jdk.incubator.vector.LaneType", onlyWith = VectorAPIEnabled.class)

0 commit comments

Comments
 (0)