RFR: 8370203 - Add jcmd AOT.end_recording diagnostic command [v4]
Mat Carter
macarte at openjdk.org
Thu Nov 20 16:00:52 UTC 2025
> Add jcmd AOT.end_recording diagnostic command. When this command is issued, a targeted JVM that is currently recording AOT information will stop recording. Existing functionality is preserved: when stopped the JVM will create the required artifacts based on the execution mode. Conveniently as the application running on the JVM has not stopped (as was previously the only way to stop recording), the application will resume execution after the artifacts have been generated.
>
> The command will report back to the user one of the following messages depending on the state of the JVM:
>
> - Error! Not a recording run
> - Error! Not recording
> - Recording ended successfully
> - Error! Failed to end recording
>
> It follows that issues the command to a JVM that is recording, twice in succession, should (baring internal errors) would produce the following two responses:
>
> - Recording ended successfully
> - Error! Not recording
>
> Passes tier1 on linux (x64) and windows (x64)
Mat Carter has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:
- Merge branch 'master' into JDK-8370203
- Updates based on feedback. Method name changes; clearer output; commnets on implemenation; remove redundant logic
- Document use of DiagnosticCommand
- Adding test to validate using DiagnosticCommand MBean to invoke AOT.end_recording
- Switched line endings to unix style LF
- Removed timing functionality as it's not needed yet
- Sort headers correctly
- 8370203 - Adding JCmd AOT.end_recording
-------------
Changes: https://git.openjdk.org/jdk/pull/27965/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27965&range=03
Stats: 288 lines in 6 files changed: 288 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/27965.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27965/head:pull/27965
PR: https://git.openjdk.org/jdk/pull/27965
More information about the serviceability-dev
mailing list