Skip to content

Commit

Permalink
update BasedOnJdkFile annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
roberttoyonaga authored and jerboaa committed Sep 17, 2024
1 parent 5174c2f commit ab16fde
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected PlatformTimeUtils() {
public record SecondsNanos(long seconds, long nanos) {
}

@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+5/src/hotspot/share/jfr/recorder/repository/jfrChunk.cpp#L38-L52")
@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
Expand Down

0 comments on commit ab16fde

Please sign in to comment.