[GR-75880] Support Native Image JFR emergency dumps on Windows#13607
Open
graalvmbot wants to merge 3 commits into
Open
[GR-75880] Support Native Image JFR emergency dumps on Windows#13607graalvmbot wants to merge 3 commits into
graalvmbot wants to merge 3 commits into
Conversation
Rebase the GR-75880 changes onto master after the dependent Windows JFR and heap dump support landed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds Native Image support for JFR emergency dumps on Windows.
Native Image already supports writing regular JFR recordings on Windows, but out-of-memory emergency dumps were still unavailable because the emergency-dump implementation was tied to POSIX directory and file handling. This PR makes emergency dumping an OS-independent feature with small platform-specific adapters.
Implementation overview:
AbstractJfrEmergencyDumpSupportfor the common emergency-dump flow: dump path handling, repository fallback, emergency chunk creation, chunk filename validation/sorting, dump file assembly, and lifecycle test hooks.PosixJfrEmergencyDumpSupportto use the shared base while keeping POSIX-specific repository scanning,openat-based file opening, and path-buffer handling local to the POSIX implementation.WindowsJfrEmergencyDumpSupport, using Win32 APIs for repository enumeration, file opening, file attributes, system time, path conversion, and cleanup.Reviewer notes:
emergency_chunk.jfr, so repeated fallback chunk creation does not depend on replacing the same file.graal-enterprisePR updates the JDK checksum metadata required by the new Windows support.