From 1670e0c678a02e6f428d1d14526d300712da943b Mon Sep 17 00:00:00 2001 From: ol-automation_ww Date: Thu, 18 Jan 2024 23:55:48 +0000 Subject: [PATCH 1/6] update JVMCI to 23+6-jvmci-b01 --- common.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common.json b/common.json index 4cff9f9703bb..0b09562a18d4 100644 --- a/common.json +++ b/common.json @@ -45,12 +45,12 @@ "labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.1+11-jvmci-23.1-b26-sulong", "platformspecific": true }, "oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "5", "release": true, "platformspecific": true, "extrabundles": ["static-libs"]}, - "labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+5-jvmci-b01", "platformspecific": true }, - "labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+5-jvmci-b01-debug", "platformspecific": true }, - "labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+5-jvmci-b01-sulong", "platformspecific": true }, - "labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23+5-jvmci-b01", "platformspecific": true }, - "labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23+5-jvmci-b01-debug", "platformspecific": true }, - "labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23+5-jvmci-b01-sulong", "platformspecific": true } + "labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+6-jvmci-b01-20240118214947-84bbd7f3ac", "platformspecific": true }, + "labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+6-jvmci-b01-20240118214947-84bbd7f3ac-debug", "platformspecific": true }, + "labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+6-jvmci-b01-20240118214947-84bbd7f3ac-sulong", "platformspecific": true }, + "labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23+6-jvmci-b01-20240118214947-84bbd7f3ac+91bc32db03", "platformspecific": true }, + "labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23+6-jvmci-b01-20240118214947-84bbd7f3ac+91bc32db03-debug", "platformspecific": true }, + "labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23+6-jvmci-b01-20240118214947-84bbd7f3ac+91bc32db03-sulong", "platformspecific": true } }, "eclipse": { From a2c70d0112b982572db8f94d906ff064a19f04bd Mon Sep 17 00:00:00 2001 From: Josef Eisl Date: Fri, 19 Jan 2024 08:27:27 +0100 Subject: [PATCH 2/6] ci: update oraclejdk-latest to 23+6 --- common.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.json b/common.json index 0b09562a18d4..7b1a39044dd9 100644 --- a/common.json +++ b/common.json @@ -44,7 +44,7 @@ "labsjdk-ee-21Debug": {"name": "labsjdk", "version": "ee-21.0.1+11-jvmci-23.1-b26-debug", "platformspecific": true }, "labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.1+11-jvmci-23.1-b26-sulong", "platformspecific": true }, - "oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "5", "release": true, "platformspecific": true, "extrabundles": ["static-libs"]}, + "oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "6", "release": true, "platformspecific": true, "extrabundles": ["static-libs"]}, "labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+6-jvmci-b01-20240118214947-84bbd7f3ac", "platformspecific": true }, "labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+6-jvmci-b01-20240118214947-84bbd7f3ac-debug", "platformspecific": true }, "labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+6-jvmci-b01-20240118214947-84bbd7f3ac-sulong", "platformspecific": true }, From bc64b92733cc8a0d062a70ebf9725bfcfcdc04b1 Mon Sep 17 00:00:00 2001 From: Josef Eisl Date: Fri, 19 Jan 2024 10:05:07 +0100 Subject: [PATCH 3/6] compiler: update JVMCIVersionCheck --- .../src/jdk/graal/compiler/hotspot/JVMCIVersionCheck.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/JVMCIVersionCheck.java b/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/JVMCIVersionCheck.java index 790aaa7808ec..e5c4472d1625 100644 --- a/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/JVMCIVersionCheck.java +++ b/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/JVMCIVersionCheck.java @@ -54,8 +54,8 @@ public final class JVMCIVersionCheck { private static final Map> JVMCI_MIN_VERSIONS = Map.of( "21", Map.of(DEFAULT_VENDOR_ENTRY, new Version(23, 1, 26)), "23", Map.of( - "Oracle Corporation", new Version("23+5", 1), - DEFAULT_VENDOR_ENTRY, new Version("23+5", 1))); + "Oracle Corporation", new Version("23+6", 1), + DEFAULT_VENDOR_ENTRY, new Version("23+6", 1))); private static final int NA = 0; /** * Minimum Java release supported by Graal. From 9d4d1dde84da4a1c346a7051a4794a5df52aaac8 Mon Sep 17 00:00:00 2001 From: Josef Eisl Date: Fri, 19 Jan 2024 09:45:48 +0100 Subject: [PATCH 4/6] svm: adopt "JDK-8323425: JFR: Auto-generated filename doesn't work with time-limited recording" --- .../svm/core/jfr/JfrJdkCompatibility.java | 28 ++++++++++++++++++- .../com/oracle/svm/core/jfr/JfrManager.java | 9 +++--- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/JfrJdkCompatibility.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/JfrJdkCompatibility.java index bce971f070c5..5dd2b20f8f8e 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/JfrJdkCompatibility.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/JfrJdkCompatibility.java @@ -28,20 +28,26 @@ import java.lang.reflect.Method; import java.time.Duration; -import jdk.graal.compiler.serviceprovider.JavaVersionUtil; import org.graalvm.nativeimage.Platform; import org.graalvm.nativeimage.Platforms; +import com.oracle.svm.core.SubstrateUtil; import com.oracle.svm.core.annotate.Alias; import com.oracle.svm.core.annotate.TargetClass; +import com.oracle.svm.core.annotate.TargetElement; import com.oracle.svm.core.jdk.JDK21OrEarlier; +import com.oracle.svm.core.jdk.JDK22OrEarlier; import com.oracle.svm.core.jdk.JDK22OrLater; +import com.oracle.svm.core.jdk.JDK23OrLater; import com.oracle.svm.core.util.VMError; import com.oracle.svm.util.ReflectionUtil; +import jdk.graal.compiler.serviceprovider.JavaVersionUtil; import jdk.jfr.Recording; import jdk.jfr.internal.JVM; import jdk.jfr.internal.JVMSupport; +import jdk.jfr.internal.PlatformRecording; +import jdk.jfr.internal.SecuritySupport; /** * Compatibility class to handle incompatible changes between JDK 21 and JDK 22. Once support for @@ -109,6 +115,15 @@ public static JVM getJVMOrNull() throws IllegalAccessException, InvocationTarget return (JVM) getJVM.invoke(null); } } + + public static void setDumpDirectory(PlatformRecording platformRecording, SecuritySupport.SafePath directory) { + Target_jdk_jfr_internal_PlatformRecording pr = SubstrateUtil.cast(platformRecording, Target_jdk_jfr_internal_PlatformRecording.class); + if (JavaVersionUtil.JAVA_SPEC >= 23) { + pr.setDumpDirectory(directory); + } else { + pr.setDumpOnExitDirectory(directory); + } + } } @TargetClass(className = "jdk.jfr.internal.Utils", onlyWith = {JDK21OrEarlier.class, HasJfrSupport.class}) @@ -131,3 +146,14 @@ final class Target_jdk_jfr_internal_util_ValueFormatter { @Alias public static native String formatTimespan(Duration dValue, String separation); } + +@TargetClass(className = "jdk.jfr.internal.PlatformRecording") +final class Target_jdk_jfr_internal_PlatformRecording { + @Alias + @TargetElement(onlyWith = JDK23OrLater.class) + public native void setDumpDirectory(SecuritySupport.SafePath directory); + + @Alias + @TargetElement(onlyWith = JDK22OrEarlier.class) + public native void setDumpOnExitDirectory(SecuritySupport.SafePath directory); +} diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/JfrManager.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/JfrManager.java index f77545e4f5e8..a8a24b6eab57 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/JfrManager.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/JfrManager.java @@ -36,8 +36,6 @@ import java.util.HashMap; import java.util.Map; -import jdk.graal.compiler.api.replacements.Fold; -import jdk.graal.compiler.core.common.SuppressFBWarnings; import org.graalvm.nativeimage.ImageSingletons; import org.graalvm.nativeimage.Platform; import org.graalvm.nativeimage.Platforms; @@ -49,6 +47,9 @@ import com.oracle.svm.core.util.UserError.UserException; import com.oracle.svm.core.util.VMError; +import jdk.graal.compiler.api.replacements.Fold; +import jdk.graal.compiler.core.common.SuppressFBWarnings; +import jdk.graal.compiler.serviceprovider.JavaVersionUtil; import jdk.jfr.FlightRecorder; import jdk.jfr.Recording; import jdk.jfr.internal.LogLevel; @@ -200,11 +201,11 @@ private static void initRecording() { dumpOnExit = Boolean.TRUE; } Path p = Paths.get(path); - if (Files.isDirectory(p) && Boolean.TRUE.equals(dumpOnExit)) { + if (Files.isDirectory(p) && (JavaVersionUtil.JAVA_SPEC >= 23 || Boolean.TRUE.equals(dumpOnExit))) { // Decide destination filename at dump time // Purposely avoid generating filename in Recording#setDestination due to // security concerns - PrivateAccess.getInstance().getPlatformRecording(recording).setDumpOnExitDirectory(new SecuritySupport.SafePath(p)); + JfrJdkCompatibility.setDumpDirectory(PrivateAccess.getInstance().getPlatformRecording(recording), new SecuritySupport.SafePath(p)); } else { safePath = resolvePath(recording, path); recording.setDestination(safePath.toPath()); From bc036552696aa9d0ab46e0d1ab393e5f337cf602 Mon Sep 17 00:00:00 2001 From: Marouane El Hallaoui Date: Fri, 19 Jan 2024 12:05:24 +0100 Subject: [PATCH 5/6] deploy labsjdk snapshots --- common.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common.json b/common.json index 7b1a39044dd9..6799e780db29 100644 --- a/common.json +++ b/common.json @@ -45,12 +45,12 @@ "labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.1+11-jvmci-23.1-b26-sulong", "platformspecific": true }, "oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "6", "release": true, "platformspecific": true, "extrabundles": ["static-libs"]}, - "labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+6-jvmci-b01-20240118214947-84bbd7f3ac", "platformspecific": true }, - "labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+6-jvmci-b01-20240118214947-84bbd7f3ac-debug", "platformspecific": true }, - "labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+6-jvmci-b01-20240118214947-84bbd7f3ac-sulong", "platformspecific": true }, - "labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23+6-jvmci-b01-20240118214947-84bbd7f3ac+91bc32db03", "platformspecific": true }, - "labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23+6-jvmci-b01-20240118214947-84bbd7f3ac+91bc32db03-debug", "platformspecific": true }, - "labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23+6-jvmci-b01-20240118214947-84bbd7f3ac+91bc32db03-sulong", "platformspecific": true } + "labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+6-jvmci-b01", "platformspecific": true }, + "labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+6-jvmci-b01-debug", "platformspecific": true }, + "labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+6-jvmci-b01-sulong", "platformspecific": true }, + "labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23+6-jvmci-b01", "platformspecific": true }, + "labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23+6-jvmci-b01-debug", "platformspecific": true }, + "labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23+6-jvmci-b01-sulong", "platformspecific": true } }, "eclipse": { From 8f7ae0d36ceae45fe97f07389e4d8938ea3928f8 Mon Sep 17 00:00:00 2001 From: Josef Eisl Date: Mon, 22 Jan 2024 09:40:53 +0100 Subject: [PATCH 6/6] svm: disable JFR tests affected by "JDK-8322675: JFR: Fail-fast mode when constants cannot be resolved" [GR-51526] --- .../svm/test/jfr/TestJavaLevelVirtualThreadEvents.java | 3 +++ .../src/com/oracle/svm/test/jfr/TestMirrorEvents.java | 3 +++ .../com/oracle/svm/test/jfr/TestVirtualThreadsBasic.java | 9 +++++---- .../svm/test/jfr/TestVirtualThreadsChunkRotation.java | 4 +++- .../svm/test/jfr/TestVirtualThreadsJfrStreaming.java | 4 +++- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestJavaLevelVirtualThreadEvents.java b/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestJavaLevelVirtualThreadEvents.java index 1810859671ab..1fc94bdf8207 100644 --- a/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestJavaLevelVirtualThreadEvents.java +++ b/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestJavaLevelVirtualThreadEvents.java @@ -36,11 +36,13 @@ import java.util.List; import java.util.Map; +import org.junit.Assume; import org.junit.Test; import com.oracle.svm.core.thread.Target_jdk_internal_vm_Continuation; import com.oracle.svm.test.jfr.events.StringEvent; +import jdk.graal.compiler.serviceprovider.JavaVersionUtil; import jdk.jfr.Recording; import jdk.jfr.consumer.RecordedEvent; import jdk.jfr.consumer.RecordedThread; @@ -54,6 +56,7 @@ public class TestJavaLevelVirtualThreadEvents extends JfrRecordingTest { @Test public void test() throws Throwable { + Assume.assumeFalse("Currently broken on JDK 23+ (GR-51526)", JavaVersionUtil.JAVA_SPEC >= 23); String[] events = new String[]{"jdk.ThreadSleep", "jdk.VirtualThreadStart", "jdk.VirtualThreadEnd", "jdk.VirtualThreadPinned", "com.jfr.String"}; Recording recording = startRecording(events); Runnable r = () -> { diff --git a/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestMirrorEvents.java b/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestMirrorEvents.java index c26c5ed35c4c..9a454c574b1c 100644 --- a/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestMirrorEvents.java +++ b/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestMirrorEvents.java @@ -30,8 +30,10 @@ import java.util.List; +import org.junit.Assume; import org.junit.Test; +import jdk.graal.compiler.serviceprovider.JavaVersionUtil; import jdk.jfr.EventType; import jdk.jfr.Recording; import jdk.jfr.consumer.RecordedEvent; @@ -45,6 +47,7 @@ public class TestMirrorEvents extends JfrRecordingTest { @Test public void test() throws Throwable { + Assume.assumeFalse("Currently broken on JDK 23+ (GR-51526)", JavaVersionUtil.JAVA_SPEC >= 23); String[] events = new String[]{"jdk.ThreadSleep", "jdk.VirtualThreadStart", "jdk.VirtualThreadEnd"}; Recording recording = startRecording(events); diff --git a/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestVirtualThreadsBasic.java b/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestVirtualThreadsBasic.java index c8812e4931e5..83cffffe34d6 100644 --- a/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestVirtualThreadsBasic.java +++ b/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestVirtualThreadsBasic.java @@ -27,8 +27,8 @@ package com.oracle.svm.test.jfr; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import static org.junit.Assume.assumeTrue; import java.util.Collections; @@ -37,14 +37,14 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; -import jdk.jfr.Recording; -import org.junit.Test; +import org.junit.Assume; import org.junit.Before; +import org.junit.Test; import com.oracle.svm.core.jfr.JfrEvent; import jdk.graal.compiler.serviceprovider.JavaVersionUtil; - +import jdk.jfr.Recording; import jdk.jfr.consumer.RecordedClass; import jdk.jfr.consumer.RecordedEvent; import jdk.jfr.consumer.RecordedThread; @@ -68,6 +68,7 @@ public void checkJavaVersion() { @Test public void test() throws Throwable { + Assume.assumeFalse("Currently broken on JDK 23+ (GR-51526)", JavaVersionUtil.JAVA_SPEC >= 23); String[] events = new String[]{JfrEvent.JavaMonitorWait.getName()}; Recording recording = startRecording(events); diff --git a/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestVirtualThreadsChunkRotation.java b/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestVirtualThreadsChunkRotation.java index c9d92f52bc40..dffc0ac5b5fa 100644 --- a/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestVirtualThreadsChunkRotation.java +++ b/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestVirtualThreadsChunkRotation.java @@ -37,12 +37,13 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; -import jdk.graal.compiler.serviceprovider.JavaVersionUtil; +import org.junit.Assume; import org.junit.Before; import org.junit.Test; import com.oracle.svm.core.jfr.JfrEvent; +import jdk.graal.compiler.serviceprovider.JavaVersionUtil; import jdk.jfr.Recording; import jdk.jfr.consumer.RecordedClass; import jdk.jfr.consumer.RecordedEvent; @@ -70,6 +71,7 @@ public void checkJavaVersion() { @Test public void test() throws Throwable { + Assume.assumeFalse("Currently broken on JDK 23+ (GR-51526)", JavaVersionUtil.JAVA_SPEC >= 23); String[] events = new String[]{JfrEvent.JavaMonitorWait.getName()}; Recording recording = startRecording(events); diff --git a/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestVirtualThreadsJfrStreaming.java b/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestVirtualThreadsJfrStreaming.java index ca479f2eb6cd..5536c7923f1a 100644 --- a/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestVirtualThreadsJfrStreaming.java +++ b/substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jfr/TestVirtualThreadsJfrStreaming.java @@ -34,12 +34,13 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; -import jdk.graal.compiler.serviceprovider.JavaVersionUtil; +import org.junit.Assume; import org.junit.Before; import org.junit.Test; import com.oracle.svm.core.jfr.JfrEvent; +import jdk.graal.compiler.serviceprovider.JavaVersionUtil; import jdk.jfr.consumer.RecordedClass; import jdk.jfr.consumer.RecordedThread; import jdk.jfr.consumer.RecordingStream; @@ -64,6 +65,7 @@ public void checkJavaVersion() { @Test public void test() throws Throwable { + Assume.assumeFalse("Currently broken on JDK 23+ (GR-51526)", JavaVersionUtil.JAVA_SPEC >= 23); String[] events = new String[]{JfrEvent.JavaMonitorWait.getName()}; RecordingStream stream = startStream(events);