Update committing of java level events #7070
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves related issues: #7052 and graalvm#546
Draft because I'm waiting for LabsJDK to be updated with the changes in OpenJDK21+32 that caused the breakage so I can test. For now, I have tested with mandrel and Temurin build of openjdk21+32.
Summary
This change openjdk/jdk21#129 caused some substitutions to become out of date. Additionally, the way Java-level events are committed by the JavaEventWriter has also changed. In openjdk, committing is now done in native Hotspot code in order to avoid safepointing potentially interrupting the commit operation. This PR achieves the same behaviour by subsituting the new
JVM#commit
method and making ituninterruptible
.