Skip to content

Commit 9581127

Browse files
OracleLabsAutomationzapster
authored andcommitted
[GR-54877] Update labsjdk to 24+3-jvmci-b01
PullRequest: graal/18117
2 parents 05ebc3b + fbc44e9 commit 9581127

File tree

12 files changed

+257
-23
lines changed

12 files changed

+257
-23
lines changed

common.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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": "24", "build_id": "jdk-24+2", "platformspecific": true, "extrabundles": ["static-libs"]},
49-
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-24+2-jvmci-b01", "platformspecific": true },
50-
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-24+2-jvmci-b01-debug", "platformspecific": true },
51-
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-24+2-jvmci-b01-sulong", "platformspecific": true },
52-
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-24+2-jvmci-b01", "platformspecific": true },
53-
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-24+2-jvmci-b01-debug", "platformspecific": true },
54-
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-24+2-jvmci-b01-sulong", "platformspecific": true }
48+
"oraclejdk-latest": {"name": "jpg-jdk", "version": "24", "build_id": "jdk-24+3", "platformspecific": true, "extrabundles": ["static-libs"]},
49+
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-24+3-jvmci-b01", "platformspecific": true },
50+
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-24+3-jvmci-b01-debug", "platformspecific": true },
51+
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-24+3-jvmci-b01-sulong", "platformspecific": true },
52+
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-24+3-jvmci-b01", "platformspecific": true },
53+
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-24+3-jvmci-b01-debug", "platformspecific": true },
54+
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-24+3-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
@@ -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
"24", Map.of(
58-
"Oracle Corporation", createLabsJDKVersion("24+2", 1),
59-
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("24+2", 1)));
58+
"Oracle Corporation", createLabsJDKVersion("24+3", 1),
59+
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("24+3", 1)));
6060
private static final int NA = 0;
6161
/**
6262
* Minimum Java release supported by Graal.

regex/src/com.oracle.truffle.regex/src/com/oracle/truffle/regex/tregex/parser/RegexLexer.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
import java.util.LinkedHashMap;
4545
import java.util.List;
4646
import java.util.Map;
47-
import java.util.function.Predicate;
47+
import java.util.function.IntPredicate;
4848

4949
import org.graalvm.collections.EconomicSet;
5050

@@ -557,7 +557,7 @@ protected boolean lookahead(String match) {
557557
return pattern.regionMatches(position, match, 0, match.length());
558558
}
559559

560-
protected boolean lookahead(Predicate<Character> predicate, int length) {
560+
protected boolean lookahead(IntPredicate predicate, int length) {
561561
if (pattern.length() - position < length) {
562562
return false;
563563
}
@@ -588,7 +588,7 @@ protected boolean consumingLookahead(String match) {
588588
return matches;
589589
}
590590

591-
protected boolean consumingLookahead(Predicate<Character> predicate, int length) {
591+
protected boolean consumingLookahead(IntPredicate predicate, int length) {
592592
final boolean matches = lookahead(predicate, length);
593593
if (matches) {
594594
position += length;
@@ -603,19 +603,19 @@ protected boolean lookbehind(char c) {
603603
return pattern.charAt(position - 1) == c;
604604
}
605605

606-
protected int count(Predicate<Character> predicate) {
606+
protected int count(IntPredicate predicate) {
607607
return count(predicate, position, pattern.length());
608608
}
609609

610-
protected int countUpTo(Predicate<Character> predicate, int max) {
610+
protected int countUpTo(IntPredicate predicate, int max) {
611611
return count(predicate, position, (int) Math.min(((long) position) + max, pattern.length()));
612612
}
613613

614-
protected int countFrom(Predicate<Character> predicate, int fromIndex) {
614+
protected int countFrom(IntPredicate predicate, int fromIndex) {
615615
return count(predicate, fromIndex, pattern.length());
616616
}
617617

618-
protected int count(Predicate<Character> predicate, int fromIndex, int toIndex) {
618+
protected int count(IntPredicate predicate, int fromIndex, int toIndex) {
619619
for (int i = fromIndex; i < toIndex; i++) {
620620
if (!predicate.test(pattern.charAt(i))) {
621621
return i - fromIndex;

regex/src/com.oracle.truffle.regex/src/com/oracle/truffle/regex/tregex/parser/flavors/RubyRegexParser.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
import java.util.List;
5454
import java.util.Map;
5555
import java.util.Optional;
56-
import java.util.function.Predicate;
56+
import java.util.function.IntPredicate;
5757

5858
import org.graalvm.collections.Pair;
5959

@@ -457,15 +457,15 @@ private int consumeChar() {
457457
return c;
458458
}
459459

460-
private String getMany(Predicate<Integer> pred) {
460+
private String getMany(IntPredicate pred) {
461461
StringBuilder out = new StringBuilder();
462462
while (!atEnd() && pred.test(curChar())) {
463463
out.appendCodePoint(consumeChar());
464464
}
465465
return out.toString();
466466
}
467467

468-
private String getUpTo(int count, Predicate<Integer> pred) {
468+
private String getUpTo(int count, IntPredicate pred) {
469469
StringBuilder out = new StringBuilder();
470470
int found = 0;
471471
while (found < count && !atEnd() && pred.test(curChar())) {
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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.posix;
26+
27+
import org.graalvm.nativeimage.StackValue;
28+
29+
import com.oracle.svm.core.feature.AutomaticallyRegisteredImageSingleton;
30+
import com.oracle.svm.core.posix.headers.Time;
31+
import com.oracle.svm.core.util.BasedOnJDKFile;
32+
import com.oracle.svm.core.util.PlatformTimeUtils;
33+
34+
@AutomaticallyRegisteredImageSingleton(PlatformTimeUtils.class)
35+
public final class PosixPlatformTimeUtils extends PlatformTimeUtils {
36+
37+
@Override
38+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/os/posix/os_posix.cpp#L1409-L1415")
39+
protected SecondsNanos javaTimeSystemUTC() {
40+
Time.timespec ts = StackValue.get(Time.timespec.class);
41+
int status = PosixUtils.clock_gettime(Time.CLOCK_REALTIME(), ts);
42+
PosixUtils.checkStatusIs0(status, "javaTimeSystemUTC: clock_gettime(CLOCK_REALTIME) failed.");
43+
return new SecondsNanos(ts.tv_sec(), ts.tv_nsec());
44+
}
45+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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.windows;
26+
27+
import static com.oracle.svm.core.windows.headers.SysinfoAPI.GetSystemTimeAsFileTime;
28+
29+
import org.graalvm.nativeimage.StackValue;
30+
import org.graalvm.word.WordFactory;
31+
32+
import com.oracle.svm.core.feature.AutomaticallyRegisteredImageSingleton;
33+
import com.oracle.svm.core.util.BasedOnJDKFile;
34+
import com.oracle.svm.core.util.PlatformTimeUtils;
35+
import com.oracle.svm.core.windows.headers.WinBase.FILETIME;
36+
37+
@AutomaticallyRegisteredImageSingleton(PlatformTimeUtils.class)
38+
public final class WindowsPlatformTimeUtils extends PlatformTimeUtils {
39+
40+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/os/windows/os_windows.cpp#L1123") //
41+
private static final long OFFSET = 116444736000000000L;
42+
43+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/os/windows/os_windows.cpp#L1153-L1155")
44+
private static long offset() {
45+
return OFFSET;
46+
}
47+
48+
/* Returns time ticks in (10th of micro seconds) */
49+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/os/windows/os_windows.cpp#L1158-L1161")
50+
private static long windowsToTimeTicks(FILETIME wt) {
51+
long a = WordFactory.unsigned(wt.dwHighDateTime()).shiftLeft(32).or(WordFactory.unsigned(wt.dwLowDateTime())).rawValue();
52+
return (a - offset());
53+
}
54+
55+
@Override
56+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/os/windows/os_windows.cpp#L1198-L1205")
57+
protected SecondsNanos javaTimeSystemUTC() {
58+
FILETIME wt = StackValue.get(FILETIME.class);
59+
GetSystemTimeAsFileTime(wt);
60+
long ticks = windowsToTimeTicks(wt); // 10th of micros
61+
long secs = ticks / 10000000L; // 10000 * 1000
62+
long seconds = secs;
63+
long nanos = (ticks - (secs * 10000000L)) * 100L;
64+
return new SecondsNanos(seconds, nanos);
65+
}
66+
67+
}

substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/headers/SysinfoAPI.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.graalvm.nativeimage.c.type.CCharPointer;
3535
import org.graalvm.word.PointerBase;
3636

37+
import com.oracle.svm.core.windows.headers.WinBase.FILETIME;
3738
import com.oracle.svm.core.windows.headers.WindowsLibC.WCharPointer;
3839

3940
// Checkstyle: stop
@@ -89,6 +90,13 @@ public interface SYSTEM_INFO extends PointerBase {
8990
short wProcessorRevision();
9091
}
9192

93+
/**
94+
* Retrieves the current system date and time. The information is in Coordinated Universal Time
95+
* (UTC) format.
96+
*/
97+
@CFunction(transition = NO_TRANSITION)
98+
public static native void GetSystemTimeAsFileTime(FILETIME lpSystemTimeAsFileTime);
99+
92100
/** Retrieves the path of the Windows directory. */
93101
@CFunction(transition = NO_TRANSITION)
94102
public static native int GetWindowsDirectoryW(WCharPointer lpBuffer, int uSize);
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (c) 2023, 2023, Oracle and/or its affiliates. All rights reserved.
3+
* Copyright (c) 2023, 2023, Red Hat Inc. All rights reserved.
4+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5+
*
6+
* This code is free software; you can redistribute it and/or modify it
7+
* under the terms of the GNU General Public License version 2 only, as
8+
* published by the Free Software Foundation. Oracle designates this
9+
* particular file as subject to the "Classpath" exception as provided
10+
* by Oracle in the LICENSE file that accompanied this code.
11+
*
12+
* This code is distributed in the hope that it will be useful, but WITHOUT
13+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15+
* version 2 for more details (a copy is included in the LICENSE file that
16+
* accompanied this code).
17+
*
18+
* You should have received a copy of the GNU General Public License version
19+
* 2 along with this work; if not, write to the Free Software Foundation,
20+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21+
*
22+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23+
* or visit www.oracle.com if you need additional information or have any
24+
* questions.
25+
*/
26+
27+
package com.oracle.svm.core.jfr;
28+
29+
import com.oracle.svm.core.annotate.TargetClass;
30+
import com.oracle.svm.core.jdk.JDK23OrLater;
31+
32+
@TargetClass(className = "jdk.jfr.internal.HiddenWait", onlyWith = {HasJfrSupport.class, JDK23OrLater.class})
33+
public final class Target_jdk_jfr_internal_HiddenWait {
34+
}

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import com.oracle.svm.core.jdk.JDK22OrLater;
4444
import com.oracle.svm.core.jdk.JDK23OrLater;
4545
import com.oracle.svm.core.jfr.traceid.JfrTraceId;
46+
import com.oracle.svm.core.util.PlatformTimeUtils;
4647
import com.oracle.svm.core.util.VMError;
4748
import com.oracle.svm.util.ReflectionUtil;
4849

@@ -198,6 +199,13 @@ public static long getTicksFrequency() {
198199
return JfrTicks.getTicksFrequency();
199200
}
200201

202+
/** See {@code JVM#nanosNow}. */
203+
@Substitute
204+
@TargetElement(onlyWith = JDK23OrLater.class)
205+
public static long nanosNow() {
206+
return PlatformTimeUtils.singleton().nanosNow();
207+
}
208+
201209
/** See {@link JVM#log}. */
202210
@Substitute
203211
public static void log(int tagSetId, int level, String message) {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
package com.oracle.svm.core.jfr;
2828

2929
import com.oracle.svm.core.annotate.TargetClass;
30+
import com.oracle.svm.core.jdk.JDK21OrEarlier;
3031

31-
@TargetClass(className = "jdk.jfr.internal.JVM$ChunkRotationMonitor", onlyWith = HasJfrSupport.class)
32+
@TargetClass(className = "jdk.jfr.internal.JVM$ChunkRotationMonitor", onlyWith = {HasJfrSupport.class, JDK21OrEarlier.class})
3233
public final class Target_jdk_jfr_internal_JVM_ChunkRotationMonitor {
3334
}

0 commit comments

Comments
 (0)