From 16bcf8534ac933cbb5d27eedde4be11e21484deb Mon Sep 17 00:00:00 2001 From: Josef Eisl Date: Mon, 24 Jun 2024 10:47:39 +0200 Subject: [PATCH 1/2] svm: adopt 'JDK-8304732: jdk/jfr/api/consumer/recordingstream/TestStop.java failed again with "Expected outer stream to have 3 events"' (cherry picked from commit fbc44e955f24be7de1c6364fc3256273c0763073) --- .../core/posix/PosixPlatformTimeUtils.java | 45 ++++++++++++ .../windows/WindowsPlatformTimeUtils.java | 67 ++++++++++++++++++ .../svm/core/windows/headers/SysinfoAPI.java | 8 +++ .../Target_jdk_jfr_internal_HiddenWait.java | 34 +++++++++ .../core/jfr/Target_jdk_jfr_internal_JVM.java | 8 +++ ...jfr_internal_JVM_ChunkRotationMonitor.java | 3 +- .../core/jfr/events/JavaMonitorWaitEvent.java | 7 +- .../svm/core/util/PlatformTimeUtils.java | 70 +++++++++++++++++++ 8 files changed, 238 insertions(+), 4 deletions(-) create mode 100644 substratevm/src/com.oracle.svm.core.posix/src/com/oracle/svm/core/posix/PosixPlatformTimeUtils.java create mode 100644 substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/WindowsPlatformTimeUtils.java create mode 100644 substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/Target_jdk_jfr_internal_HiddenWait.java create mode 100644 substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/util/PlatformTimeUtils.java diff --git a/substratevm/src/com.oracle.svm.core.posix/src/com/oracle/svm/core/posix/PosixPlatformTimeUtils.java b/substratevm/src/com.oracle.svm.core.posix/src/com/oracle/svm/core/posix/PosixPlatformTimeUtils.java new file mode 100644 index 000000000000..dfe8945d3814 --- /dev/null +++ b/substratevm/src/com.oracle.svm.core.posix/src/com/oracle/svm/core/posix/PosixPlatformTimeUtils.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2024, 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.oracle.svm.core.posix; + +import org.graalvm.nativeimage.StackValue; + +import com.oracle.svm.core.feature.AutomaticallyRegisteredImageSingleton; +import com.oracle.svm.core.posix.headers.Time; +import com.oracle.svm.core.util.BasedOnJDKFile; +import com.oracle.svm.core.util.PlatformTimeUtils; + +@AutomaticallyRegisteredImageSingleton(PlatformTimeUtils.class) +public final class PosixPlatformTimeUtils extends PlatformTimeUtils { + + @Override + @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/os/posix/os_posix.cpp#L1409-L1415") + protected SecondsNanos javaTimeSystemUTC() { + Time.timespec ts = StackValue.get(Time.timespec.class); + int status = PosixUtils.clock_gettime(Time.CLOCK_REALTIME(), ts); + PosixUtils.checkStatusIs0(status, "javaTimeSystemUTC: clock_gettime(CLOCK_REALTIME) failed."); + return new SecondsNanos(ts.tv_sec(), ts.tv_nsec()); + } +} diff --git a/substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/WindowsPlatformTimeUtils.java b/substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/WindowsPlatformTimeUtils.java new file mode 100644 index 000000000000..2722ffaa18a4 --- /dev/null +++ b/substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/WindowsPlatformTimeUtils.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2024, 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.oracle.svm.core.windows; + +import static com.oracle.svm.core.windows.headers.SysinfoAPI.GetSystemTimeAsFileTime; + +import org.graalvm.nativeimage.StackValue; +import org.graalvm.word.WordFactory; + +import com.oracle.svm.core.feature.AutomaticallyRegisteredImageSingleton; +import com.oracle.svm.core.util.BasedOnJDKFile; +import com.oracle.svm.core.util.PlatformTimeUtils; +import com.oracle.svm.core.windows.headers.WinBase.FILETIME; + +@AutomaticallyRegisteredImageSingleton(PlatformTimeUtils.class) +public final class WindowsPlatformTimeUtils extends PlatformTimeUtils { + + @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/os/windows/os_windows.cpp#L1123") // + private static final long OFFSET = 116444736000000000L; + + @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/os/windows/os_windows.cpp#L1153-L1155") + private static long offset() { + return OFFSET; + } + + /* Returns time ticks in (10th of micro seconds) */ + @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/os/windows/os_windows.cpp#L1158-L1161") + private static long windowsToTimeTicks(FILETIME wt) { + long a = WordFactory.unsigned(wt.dwHighDateTime()).shiftLeft(32).or(WordFactory.unsigned(wt.dwLowDateTime())).rawValue(); + return (a - offset()); + } + + @Override + @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/os/windows/os_windows.cpp#L1198-L1205") + protected SecondsNanos javaTimeSystemUTC() { + FILETIME wt = StackValue.get(FILETIME.class); + GetSystemTimeAsFileTime(wt); + long ticks = windowsToTimeTicks(wt); // 10th of micros + long secs = ticks / 10000000L; // 10000 * 1000 + long seconds = secs; + long nanos = (ticks - (secs * 10000000L)) * 100L; + return new SecondsNanos(seconds, nanos); + } + +} diff --git a/substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/headers/SysinfoAPI.java b/substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/headers/SysinfoAPI.java index 54ad46091a3b..5735a034e073 100644 --- a/substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/headers/SysinfoAPI.java +++ b/substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/headers/SysinfoAPI.java @@ -34,6 +34,7 @@ import org.graalvm.nativeimage.c.type.CCharPointer; import org.graalvm.word.PointerBase; +import com.oracle.svm.core.windows.headers.WinBase.FILETIME; import com.oracle.svm.core.windows.headers.WindowsLibC.WCharPointer; // Checkstyle: stop @@ -89,6 +90,13 @@ public interface SYSTEM_INFO extends PointerBase { short wProcessorRevision(); } + /** + * Retrieves the current system date and time. The information is in Coordinated Universal Time + * (UTC) format. + */ + @CFunction(transition = NO_TRANSITION) + public static native void GetSystemTimeAsFileTime(FILETIME lpSystemTimeAsFileTime); + /** Retrieves the path of the Windows directory. */ @CFunction(transition = NO_TRANSITION) public static native int GetWindowsDirectoryW(WCharPointer lpBuffer, int uSize); diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/Target_jdk_jfr_internal_HiddenWait.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/Target_jdk_jfr_internal_HiddenWait.java new file mode 100644 index 000000000000..42a0eadc2252 --- /dev/null +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/Target_jdk_jfr_internal_HiddenWait.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2023, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2023, Red Hat Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.oracle.svm.core.jfr; + +import com.oracle.svm.core.annotate.TargetClass; +import com.oracle.svm.core.jdk.JDK23OrLater; + +@TargetClass(className = "jdk.jfr.internal.HiddenWait", onlyWith = {HasJfrSupport.class, JDK23OrLater.class}) +public final class Target_jdk_jfr_internal_HiddenWait { +} diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/Target_jdk_jfr_internal_JVM.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/Target_jdk_jfr_internal_JVM.java index bc05e841eb65..874fdbcf2359 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/Target_jdk_jfr_internal_JVM.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/Target_jdk_jfr_internal_JVM.java @@ -43,6 +43,7 @@ import com.oracle.svm.core.jdk.JDK22OrLater; import com.oracle.svm.core.jdk.JDK23OrLater; import com.oracle.svm.core.jfr.traceid.JfrTraceId; +import com.oracle.svm.core.util.PlatformTimeUtils; import com.oracle.svm.core.util.VMError; import com.oracle.svm.util.ReflectionUtil; @@ -198,6 +199,13 @@ public static long getTicksFrequency() { return JfrTicks.getTicksFrequency(); } + /** See {@code JVM#nanosNow}. */ + @Substitute + @TargetElement(onlyWith = JDK23OrLater.class) + public static long nanosNow() { + return PlatformTimeUtils.singleton().nanosNow(); + } + /** See {@link JVM#log}. */ @Substitute public static void log(int tagSetId, int level, String message) { diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/Target_jdk_jfr_internal_JVM_ChunkRotationMonitor.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/Target_jdk_jfr_internal_JVM_ChunkRotationMonitor.java index b899031a14c4..665d350fea39 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/Target_jdk_jfr_internal_JVM_ChunkRotationMonitor.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/Target_jdk_jfr_internal_JVM_ChunkRotationMonitor.java @@ -27,7 +27,8 @@ package com.oracle.svm.core.jfr; import com.oracle.svm.core.annotate.TargetClass; +import com.oracle.svm.core.jdk.JDK21OrEarlier; -@TargetClass(className = "jdk.jfr.internal.JVM$ChunkRotationMonitor", onlyWith = HasJfrSupport.class) +@TargetClass(className = "jdk.jfr.internal.JVM$ChunkRotationMonitor", onlyWith = {HasJfrSupport.class, JDK21OrEarlier.class}) public final class Target_jdk_jfr_internal_JVM_ChunkRotationMonitor { } diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/events/JavaMonitorWaitEvent.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/events/JavaMonitorWaitEvent.java index 2e6c2ac0957b..b9e3dd5a2bfd 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/events/JavaMonitorWaitEvent.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/events/JavaMonitorWaitEvent.java @@ -26,8 +26,6 @@ package com.oracle.svm.core.jfr.events; -import jdk.graal.compiler.word.Word; - import com.oracle.svm.core.Uninterruptible; import com.oracle.svm.core.jfr.HasJfrSupport; import com.oracle.svm.core.jfr.JfrEvent; @@ -36,11 +34,14 @@ import com.oracle.svm.core.jfr.JfrNativeEventWriterDataAccess; import com.oracle.svm.core.jfr.JfrTicks; import com.oracle.svm.core.jfr.SubstrateJVM; +import com.oracle.svm.core.jfr.Target_jdk_jfr_internal_HiddenWait; import com.oracle.svm.core.jfr.Target_jdk_jfr_internal_JVM_ChunkRotationMonitor; +import jdk.graal.compiler.word.Word; + public class JavaMonitorWaitEvent { public static void emit(long startTicks, Object obj, long notifier, long timeout, boolean timedOut) { - if (HasJfrSupport.get() && obj != null && !Target_jdk_jfr_internal_JVM_ChunkRotationMonitor.class.equals(obj.getClass())) { + if (HasJfrSupport.get() && obj != null && !Target_jdk_jfr_internal_JVM_ChunkRotationMonitor.class.equals(obj.getClass()) && !Target_jdk_jfr_internal_HiddenWait.class.equals(obj.getClass())) { emit0(startTicks, obj, notifier, timeout, timedOut); } } diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/util/PlatformTimeUtils.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/util/PlatformTimeUtils.java new file mode 100644 index 000000000000..d002f23e1ea7 --- /dev/null +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/util/PlatformTimeUtils.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2024, 2024, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.oracle.svm.core.util; + +import org.graalvm.nativeimage.ImageSingletons; +import org.graalvm.nativeimage.Platform; +import org.graalvm.nativeimage.Platforms; + +import jdk.graal.compiler.api.replacements.Fold; + +/** + * Platform dependent time related utils. See also {@link TimeUtils} for platform independent utils. + */ +public abstract class PlatformTimeUtils { + + @Fold + public static PlatformTimeUtils singleton() { + return ImageSingletons.lookup(PlatformTimeUtils.class); + } + + @Platforms(Platform.HOSTED_ONLY.class) + protected PlatformTimeUtils() { + } + + private long last = 0; + + public record SecondsNanos(long seconds, long nanos) { + } + + @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/share/jfr/recorder/repository/jfrChunk.cpp#L38-L54") + public long nanosNow() { + // Use same clock source as Instant.now() to ensure + // that Recording::getStopTime() returns an Instant that + // is in sync. + var t = javaTimeSystemUTC(); + long seconds = t.seconds; + long nanos = t.nanos; + long now = seconds * 1000000000 + nanos; + if (now > last) { + last = now; + } else { + ++last; + } + return last; + } + + protected abstract SecondsNanos javaTimeSystemUTC(); +} From e308905953dd047c54aedd6e605090f3f626d000 Mon Sep 17 00:00:00 2001 From: Robert Toyonaga Date: Wed, 3 Jul 2024 15:50:23 -0400 Subject: [PATCH 2/2] update BasedOnJdkFile annotations. --- .../com/oracle/svm/core/posix/PosixPlatformTimeUtils.java | 2 +- .../oracle/svm/core/windows/WindowsPlatformTimeUtils.java | 8 ++++---- .../src/com/oracle/svm/core/util/PlatformTimeUtils.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/substratevm/src/com.oracle.svm.core.posix/src/com/oracle/svm/core/posix/PosixPlatformTimeUtils.java b/substratevm/src/com.oracle.svm.core.posix/src/com/oracle/svm/core/posix/PosixPlatformTimeUtils.java index dfe8945d3814..f19a146c0dd9 100644 --- a/substratevm/src/com.oracle.svm.core.posix/src/com/oracle/svm/core/posix/PosixPlatformTimeUtils.java +++ b/substratevm/src/com.oracle.svm.core.posix/src/com/oracle/svm/core/posix/PosixPlatformTimeUtils.java @@ -35,7 +35,7 @@ public final class PosixPlatformTimeUtils extends PlatformTimeUtils { @Override - @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/os/posix/os_posix.cpp#L1409-L1415") + @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-23+9/src/hotspot/os/posix/os_posix.cpp#L1387-L1393") protected SecondsNanos javaTimeSystemUTC() { Time.timespec ts = StackValue.get(Time.timespec.class); int status = PosixUtils.clock_gettime(Time.CLOCK_REALTIME(), ts); diff --git a/substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/WindowsPlatformTimeUtils.java b/substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/WindowsPlatformTimeUtils.java index 2722ffaa18a4..1b88083ddac5 100644 --- a/substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/WindowsPlatformTimeUtils.java +++ b/substratevm/src/com.oracle.svm.core.windows/src/com/oracle/svm/core/windows/WindowsPlatformTimeUtils.java @@ -37,23 +37,23 @@ @AutomaticallyRegisteredImageSingleton(PlatformTimeUtils.class) public final class WindowsPlatformTimeUtils extends PlatformTimeUtils { - @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/os/windows/os_windows.cpp#L1123") // + @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-23+9/src/hotspot/os/windows/os_windows.cpp#L1012") // private static final long OFFSET = 116444736000000000L; - @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/os/windows/os_windows.cpp#L1153-L1155") + @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-23+9/src/hotspot/os/windows/os_windows.cpp#L1042-L1044") private static long offset() { return OFFSET; } /* Returns time ticks in (10th of micro seconds) */ - @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/os/windows/os_windows.cpp#L1158-L1161") + @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-23+9/src/hotspot/os/windows/os_windows.cpp#L1047-L1050") private static long windowsToTimeTicks(FILETIME wt) { long a = WordFactory.unsigned(wt.dwHighDateTime()).shiftLeft(32).or(WordFactory.unsigned(wt.dwLowDateTime())).rawValue(); return (a - offset()); } @Override - @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/os/windows/os_windows.cpp#L1198-L1205") + @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-23+9/src/hotspot/os/windows/os_windows.cpp#L1087-L1094") protected SecondsNanos javaTimeSystemUTC() { FILETIME wt = StackValue.get(FILETIME.class); GetSystemTimeAsFileTime(wt); diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/util/PlatformTimeUtils.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/util/PlatformTimeUtils.java index d002f23e1ea7..ba8c5e3d40ce 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/util/PlatformTimeUtils.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/util/PlatformTimeUtils.java @@ -49,7 +49,7 @@ protected PlatformTimeUtils() { public record SecondsNanos(long seconds, long nanos) { } - @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+3/src/hotspot/share/jfr/recorder/repository/jfrChunk.cpp#L38-L54") + @BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-23+9/src/hotspot/share/jfr/recorder/repository/jfrChunk.cpp#L38-L54") public long nanosNow() { // Use same clock source as Instant.now() to ensure // that Recording::getStopTime() returns an Instant that