Skip to content

Commit 9e3787f

Browse files
OracleLabsAutomationzapster
authored andcommitted
[GR-54580] Update labsjdk to 23+26-jvmci-b01
PullRequest: graal/17952
2 parents 96a6258 + 03074fc commit 9e3787f

File tree

10 files changed

+130
-54
lines changed

10 files changed

+130
-54
lines changed

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": "23", "build_id": "jdk-23+25-2038", "platformspecific": true, "extrabundles": ["static-libs"]},
11+
"galahad-jdk": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+26-2139", "platformspecific": true, "extrabundles": ["static-libs"]},
1212

1313
"oraclejdk11": {"name": "jpg-jdk", "version": "11.0.11", "build_id": "jdk-11.0.11+9", "platformspecific": true, "extrabundles": ["static-libs"] },
1414

@@ -45,13 +45,13 @@
4545
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.2+13-jvmci-23.1-b33-sulong", "platformspecific": true },
4646
"graalvm-ee-21": {"name": "graalvm-java21", "version": "23.1.3", "platformspecific": true },
4747

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

5757
"eclipse": {

compiler/src/jdk.graal.compiler.hotspot.jdk23.test/src/jdk/graal/compiler/hotspot/jdk23/test/VectorizedHashCodeTest.java

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*/
2525
package jdk.graal.compiler.hotspot.jdk23.test;
2626

27+
import java.lang.reflect.Field;
2728
import java.nio.charset.StandardCharsets;
2829
import java.util.HashSet;
2930
import java.util.Set;
@@ -40,20 +41,31 @@
4041
@AddExports({"java.base/jdk.internal.util"})
4142
public class VectorizedHashCodeTest extends GraalCompilerTest {
4243

44+
private static int getField(String name) {
45+
try {
46+
var arraysSupport = Class.forName("jdk.internal.util.ArraysSupport");
47+
Field f = arraysSupport.getDeclaredField(name);
48+
f.setAccessible(true);
49+
return f.getInt(null);
50+
} catch (Throwable e) {
51+
throw new RuntimeException(e);
52+
}
53+
}
54+
4355
@Test
4456
public void testJDKConstantValue() {
45-
Assert.assertEquals(ArraysSupport.T_BOOLEAN, VectorizedHashCodeInvocationPlugin.T_BOOLEAN);
46-
Assert.assertEquals(ArraysSupport.T_CHAR, VectorizedHashCodeInvocationPlugin.T_CHAR);
47-
Assert.assertEquals(ArraysSupport.T_BYTE, VectorizedHashCodeInvocationPlugin.T_BYTE);
48-
Assert.assertEquals(ArraysSupport.T_SHORT, VectorizedHashCodeInvocationPlugin.T_SHORT);
49-
Assert.assertEquals(ArraysSupport.T_INT, VectorizedHashCodeInvocationPlugin.T_INT);
57+
Assert.assertEquals(getField("T_BOOLEAN"), VectorizedHashCodeInvocationPlugin.T_BOOLEAN);
58+
Assert.assertEquals(getField("T_CHAR"), VectorizedHashCodeInvocationPlugin.T_CHAR);
59+
Assert.assertEquals(getField("T_BYTE"), VectorizedHashCodeInvocationPlugin.T_BYTE);
60+
Assert.assertEquals(getField("T_SHORT"), VectorizedHashCodeInvocationPlugin.T_SHORT);
61+
Assert.assertEquals(getField("T_INT"), VectorizedHashCodeInvocationPlugin.T_INT);
5062
}
5163

5264
// @formatter:off
5365
private static String[] tests = {"", " ", "a", "abcdefg",
54-
"It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair, we had everything before us, we had nothing before us, we were all going direct to Heaven, we were all going direct the other way- in short, the period was so far like the present period, that some of its noisiest authorities insisted on its being received, for good or for evil, in the superlative degree of comparison only. -- Charles Dickens, Tale of Two Cities",
55-
"C'était le meilleur des temps, c'était le pire des temps, c'était l'âge de la sagesse, c'était l'âge de la folie, c'était l'époque de la croyance, c'était l'époque de l'incrédulité, c'était la saison de la Lumière, c'était C'était la saison des Ténèbres, c'était le printemps de l'espoir, c'était l'hiver du désespoir, nous avions tout devant nous, nous n'avions rien devant nous, nous allions tous directement au Ciel, nous allions tous directement dans l'autre sens bref, la période ressemblait tellement à la période actuelle, que certaines de ses autorités les plus bruyantes ont insisté pour qu'elle soit reçue, pour le bien ou pour le mal, au degré superlatif de la comparaison seulement. -- Charles Dickens, Tale of Two Cities (in French)",
56-
"禅道修行を志した雲水は、一般に参禅のしきたりを踏んだうえで一人の師につき、各地にある専門道場と呼ばれる養成寺院に入門し、与えられた公案に取り組むことになる。公案は、師家(老師)から雲水が悟りの境地へと進んで行くために手助けとして課す問題であり、悟りの境地に達していない人には容易に理解し難い難問だが、屁理屈や詭弁が述べられているわけではなく、頓知や謎かけとも異なる。"
66+
"It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair, we had everything before us, we had nothing before us, we were all going direct to Heaven, we were all going direct the other way- in short, the period was so far like the present period, that some of its noisiest authorities insisted on its being received, for good or for evil, in the superlative degree of comparison only. -- Charles Dickens, Tale of Two Cities",
67+
"C'était le meilleur des temps, c'était le pire des temps, c'était l'âge de la sagesse, c'était l'âge de la folie, c'était l'époque de la croyance, c'était l'époque de l'incrédulité, c'était la saison de la Lumière, c'était C'était la saison des Ténèbres, c'était le printemps de l'espoir, c'était l'hiver du désespoir, nous avions tout devant nous, nous n'avions rien devant nous, nous allions tous directement au Ciel, nous allions tous directement dans l'autre sens bref, la période ressemblait tellement à la période actuelle, que certaines de ses autorités les plus bruyantes ont insisté pour qu'elle soit reçue, pour le bien ou pour le mal, au degré superlatif de la comparaison seulement. -- Charles Dickens, Tale of Two Cities (in French)",
68+
"禅道修行を志した雲水は、一般に参禅のしきたりを踏んだうえで一人の師につき、各地にある専門道場と呼ばれる養成寺院に入門し、与えられた公案に取り組むことになる。公案は、師家(老師)から雲水が悟りの境地へと進んで行くために手助けとして課す問題であり、悟りの境地に達していない人には容易に理解し難い難問だが、屁理屈や詭弁が述べられているわけではなく、頓知や謎かけとも異なる。"
5769
};
5870
// @formatter:on
5971

@@ -89,7 +101,7 @@ private void testHash(String method, Function<byte[], Object> f, Function<byte[]
89101
}
90102

91103
public static int hashByteArray(byte[] array, int fromIndex, int length, int initialValue) {
92-
return ArraysSupport.vectorizedHashCode(array, fromIndex, length, initialValue, ArraysSupport.T_BYTE);
104+
return ArraysSupport.hashCode(array, fromIndex, length, initialValue);
93105
}
94106

95107
@Test
@@ -98,16 +110,16 @@ public void testHashByteArray() {
98110
}
99111

100112
public static int hashByteArrayCharElement(byte[] array, int fromIndex, int length, int initialValue) {
101-
return ArraysSupport.vectorizedHashCode(array, fromIndex, length, initialValue, ArraysSupport.T_CHAR);
113+
return ArraysSupport.hashCode(array, fromIndex, length, initialValue);
102114
}
103115

104116
@Test
105117
public void testHashByteArrayCharElement() {
106118
testHash("hashByteArrayCharElement", a -> a, a -> a.length / 2);
107119
}
108120

109-
public static int hashBooleanArray(Object array, int fromIndex, int length, int initialValue) {
110-
return ArraysSupport.vectorizedHashCode(array, fromIndex, length, initialValue, ArraysSupport.T_BOOLEAN);
121+
public static int hashBooleanArray(byte[] array, int fromIndex, int length, int initialValue) {
122+
return ArraysSupport.hashCode(array, fromIndex, length, initialValue);
111123
}
112124

113125
@Test
@@ -124,7 +136,7 @@ public void testHashBooleanArray() {
124136
}
125137

126138
public static int hashCharArray(char[] array, int fromIndex, int length, int initialValue) {
127-
return ArraysSupport.vectorizedHashCode(array, fromIndex, length, initialValue, ArraysSupport.T_CHAR);
139+
return ArraysSupport.hashCode(array, fromIndex, length, initialValue);
128140
}
129141

130142
@Test
@@ -139,7 +151,7 @@ public void testHashCharArray() {
139151
}
140152

141153
public static int hashShortArray(short[] array, int fromIndex, int length, int initialValue) {
142-
return ArraysSupport.vectorizedHashCode(array, fromIndex, length, initialValue, ArraysSupport.T_SHORT);
154+
return ArraysSupport.hashCode(array, fromIndex, length, initialValue);
143155
}
144156

145157
@Test
@@ -154,7 +166,7 @@ public void testHashShortArray() {
154166
}
155167

156168
public static int hashIntArray(int[] array, int fromIndex, int length, int initialValue) {
157-
return ArraysSupport.vectorizedHashCode(array, fromIndex, length, initialValue, ArraysSupport.T_INT);
169+
return ArraysSupport.hashCode(array, fromIndex, length, initialValue);
158170
}
159171

160172
@Test

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
@@ -55,8 +55,8 @@ public final class JVMCIVersionCheck {
5555
private static final Map<String, Map<String, Version>> JVMCI_MIN_VERSIONS = Map.of(
5656
"21", Map.of(DEFAULT_VENDOR_ENTRY, createLegacyVersion(23, 1, 33)),
5757
"23", Map.of(
58-
"Oracle Corporation", createLabsJDKVersion("23+25", 1),
59-
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("23+25", 1)));
58+
"Oracle Corporation", createLabsJDKVersion("23+26", 1),
59+
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("23+26", 1)));
6060
private static final int NA = 0;
6161
/**
6262
* Minimum Java release supported by Graal.

substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/WindowsPlatformThreads.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ protected void reset() {
208208
}
209209

210210
@Override
211-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-23+10/src/hotspot/os/windows/os_windows.cpp#L5457-L5499")
211+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-23+26/src/hotspot/os/windows/os_windows.cpp#L5672-L5714")
212212
protected void park(boolean isAbsolute, long time) {
213213
assert time >= 0 && !(isAbsolute && time == 0) : "must not be called otherwise";
214214

@@ -256,7 +256,7 @@ private static int toDword(long value) {
256256
}
257257

258258
@Override
259-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-23+10/src/hotspot/os/windows/os_windows.cpp#L5501-L5504")
259+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-23+26/src/hotspot/os/windows/os_windows.cpp#L5716-L5719")
260260
protected void unpark() {
261261
StackOverflowCheck.singleton().makeYellowZoneAvailable();
262262
try {

substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/WindowsThreadCpuTimeSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public long getThreadCpuTime(IsolateThread isolateThread, boolean includeSystemT
5555
return getThreadCpuTime(hThread, includeSystemTime);
5656
}
5757

58-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-23+10/src/hotspot/os/windows/os_windows.cpp#L4722-L4738")
58+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-23+26/src/hotspot/os/windows/os_windows.cpp#L4960-L4976")
5959
@Uninterruptible(reason = "Called from uninterruptible code.", mayBeInlined = true)
6060
private static long getThreadCpuTime(HANDLE hThread, boolean includeSystemTime) {
6161
FILETIME create = StackValue.get(FILETIME.class);

substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/WindowsUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ static boolean flush(int handle) {
133133

134134
/** Retrieve a nanosecond counter for elapsed time measurement. */
135135
@Uninterruptible(reason = "Called from uninterruptible code.", mayBeInlined = true)
136-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-22+22/src/hotspot/os/windows/os_windows.cpp#L976-L983")
137-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-22+22/src/hotspot/os/windows/os_windows.cpp#L1081-L1087")
136+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-23+26/src/hotspot/os/windows/os_windows.cpp#L1089-L1096")
137+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-23+26/src/hotspot/os/windows/os_windows.cpp#L1194-L1200")
138138
public static long getNanoCounter() {
139139
if (performanceFrequency == 0L) {
140140
CLongPointer count = StackValue.get(CLongPointer.class);

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@
3535
import com.oracle.svm.core.annotate.RecomputeFieldValue;
3636
import com.oracle.svm.core.annotate.RecomputeFieldValue.Kind;
3737
import com.oracle.svm.core.annotate.TargetClass;
38+
import com.oracle.svm.core.jfr.Name_jdk_jfr_internal_JDKEvents_helper;
3839

39-
@TargetClass(className = "jdk.jfr.internal.instrument.JDKEvents")
40+
@TargetClass(classNameProvider = Name_jdk_jfr_internal_JDKEvents_helper.class)
4041
@Platforms(LINUX.class)
41-
final class Target_jdk_jfr_internal_instrument_JDKEvents {
42+
final class Target_jdk_jfr_internal_JDKEvents {
4243
@Alias //
4344
@RecomputeFieldValue(kind = Kind.Reset) //
4445
private static Target_jdk_internal_platform_Metrics containerMetrics;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Copyright (c) 2024, 2024, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation. Oracle designates this
8+
* particular file as subject to the "Classpath" exception as provided
9+
* by Oracle in the LICENSE file that accompanied this code.
10+
*
11+
* This code is distributed in the hope that it will be useful, but WITHOUT
12+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
* version 2 for more details (a copy is included in the LICENSE file that
15+
* accompanied this code).
16+
*
17+
* You should have received a copy of the GNU General Public License version
18+
* 2 along with this work; if not, write to the Free Software Foundation,
19+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
*
21+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
* or visit www.oracle.com if you need additional information or have any
23+
* questions.
24+
*/
25+
package com.oracle.svm.core.jfr;
26+
27+
import java.util.function.Function;
28+
29+
import org.graalvm.nativeimage.Platform;
30+
import org.graalvm.nativeimage.Platforms;
31+
32+
import com.oracle.svm.core.annotate.TargetClass;
33+
34+
import jdk.graal.compiler.serviceprovider.JavaVersionUtil;
35+
36+
@Platforms(Platform.HOSTED_ONLY.class)
37+
public final class Name_jdk_jfr_internal_JDKEvents_helper implements Function<TargetClass, String> {
38+
39+
@Override
40+
public String apply(TargetClass annotation) {
41+
if (JavaVersionUtil.JAVA_SPEC >= 23) {
42+
return "jdk.jfr.internal.JDKEvents";
43+
} else {
44+
return "jdk.jfr.internal.instrument.JDKEvents";
45+
}
46+
}
47+
}

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/Target_jdk_jfr_internal_instrument_JDKEvents.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,20 @@
3333
import jdk.jfr.events.ActiveRecordingEvent;
3434
import jdk.jfr.events.ActiveSettingEvent;
3535

36-
@TargetClass(className = "jdk.jfr.internal.instrument.JDKEvents", onlyWith = HasJfrSupport.class)
36+
@TargetClass(classNameProvider = Name_jdk_jfr_internal_JDKEvents_helper.class, onlyWith = HasJfrSupport.class)
3737
final class Target_jdk_jfr_internal_instrument_JDKEvents {
3838

39-
@Alias @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.FromAlias, isFinal = true) private static Class<?>[] eventClasses = {
39+
@Alias //
40+
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.FromAlias, isFinal = true) //
41+
private static Class<?>[] eventClasses = {
4042
ActiveSettingEvent.class,
4143
ActiveRecordingEvent.class
4244
};
4345

4446
// This is a list of the classes with instrumentation code that should be applied.
45-
@Alias @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.FromAlias, isFinal = true) private static Class<?>[] instrumentationClasses = new Class<?>[]{};
47+
@Alias //
48+
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.FromAlias, isFinal = true) //
49+
@TargetElement(onlyWith = JDK21OrEarlier.class) private static Class<?>[] instrumentationClasses = new Class<?>[]{};
4650

4751
@Alias //
4852
@TargetElement(onlyWith = JDK21OrEarlier.class) //

0 commit comments

Comments
 (0)