Skip to content

Conversation

roberttoyonaga
Copy link
Collaborator

@roberttoyonaga roberttoyonaga commented Jun 27, 2024

Related issues: #9201 and #9199

This pull request:

  1. Updates JfrTicks to use the new PlatformTimeUtils.nanosNow() method. This ensures that borrowed java-level JDK code that uses JVM.nanosNow() is using the same clock that we timestamp chunk files with. See the comment here. Currently we use System.currentTimeMillis() to timestamp chunks, which is a different clock and only has ms precision. This might cause inconsistencies if JDK code uses JVM.nanosNow() and compares it to times retrieved from System.currentTimeMillis() .
  2. Removes the duplicate emission of jdk.ThreadSleep events from SVM code. Previously the events were being emitted from borrowed Java-level JDK code and then again from SubstrateVM code.

Before
image

After:
image

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 27, 2024
@roberttoyonaga roberttoyonaga marked this pull request as ready for review June 27, 2024 18:11
@roberttoyonaga roberttoyonaga changed the title Remove duplicate ThreadSleep JFR events and use a common clock for JFR chunks Remove duplicate ThreadSleep JFR events and use nanosNow() to timestamp JFR chunks Jun 27, 2024
@zapster zapster requested a review from christianhaeubl June 28, 2024 07:54
@christianhaeubl christianhaeubl changed the title Remove duplicate ThreadSleep JFR events and use nanosNow() to timestamp JFR chunks [GR-54994] Remove duplicate ThreadSleep JFR events and use nanosNow() to timestamp JFR chunks. Jul 11, 2024
@christianhaeubl
Copy link
Member

Thanks, this PR will be merged in the next few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

native-image native-image-jfr OCA Verified All contributors have signed the Oracle Contributor Agreement. redhat-interest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants