RFR: 8370203 - Add jcmd AOT.end_recording diagnostic command [v3]

Kevin Walls kevinw at openjdk.org
Fri Nov 14 13:01:08 UTC 2025


On Thu, 13 Nov 2025 19:41:40 GMT, Mat Carter <macarte at openjdk.org> wrote:

>> 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 incrementally with one additional commit since the last revision:
> 
>   Document use of DiagnosticCommand

src/hotspot/share/services/diagnosticCommand.cpp line 991:

> 989: }
> 990: 
> 991: #if INCLUDE_CDS

A simple style nit-pick:  Error!
The JVM doesn't really dramatize problems like that.  It tells you there was an error, and calmly describes the problem after a colon. "Error: " 8-)

(There are some "Error!" exclamations in java.xml and one has got into jdk.jfr, but they are unusual.)

You can tell me that nit-picking is NOT hyphenated if you like.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27965#discussion_r2527414361


More information about the serviceability-dev mailing list