RFR: 8369736 - Add management interface for AOT cache creation [v8]
Alan Bateman
alanb at openjdk.org
Fri Nov 21 11:35:57 UTC 2025
On Thu, 13 Nov 2025 19:55:24 GMT, Mat Carter <macarte at openjdk.org> wrote:
>> Add jdk.management.AOTCacheMXBean. The interface provides a single action that when called will cause any hosted JVM 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 interface will return TRUE if a recording was successfully stopped, in all other cases (not recording etc.) will return FALSE
>>
>> It follows that invoking the action on a JVM that is recording, twice in succession, should (baring internal errors) produce the following two responses:
>>
>> TRUE
>> FALSE
>>
>> Passes tier1 on linux (x64) and windows (x64)
>
> Mat Carter has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove single whitespace
I went through the plumbing to check the registration with the platform MBeanServer and everything looks okay (and consistent with how the other JDK-specific management interfaces are setup and registered).
src/jdk.management/share/classes/jdk/management/HotSpotAOTCacheMXBean.java line 97:
> 95: * successfully; {@code false} otherwise.
> 96: */
> 97: public boolean endRecording();
Minor nit is that we usually use 4-space rather than 2-space indent in the java sources. You might want to check the /** .. */ comments in a few of the files as they are misaligned in a few places.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28010#issuecomment-3562626766
PR Review Comment: https://git.openjdk.org/jdk/pull/28010#discussion_r2549470742
More information about the hotspot-dev
mailing list