jmx-dev RFR: 8369736 - Add management interface for AOT cache creation
Dan Heidinga
heidinga at openjdk.org
Tue Oct 28 14:37:45 UTC 2025
On Tue, 28 Oct 2025 01:17:57 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)
src/jdk.management/share/classes/jdk/management/HotSpotAOTCacheMXBean.java line 34:
> 32:
> 33: /**
> 34: * Management interface for the JDK's Ahead of Time (AOT) optimizations.
I don't like the word "optimizations" here but don't have a better one. Maybe "operation"? Still not great
src/jdk.management/share/classes/jdk/management/HotSpotAOTCacheMXBean.java line 54:
> 52: *
> 53: * <p>The JVM will start recording AOT artifacts upon start-up if certain JVM options are
> 54: * given in the command-line. The recording will stop when the JVM exits, or when
Suggestion:
* supplied on the command-line. The recording will stop when the JVM exits, or when
src/jdk.management/share/classes/jdk/management/HotSpotAOTCacheMXBean.java line 61:
> 59: * <blockquote>
> 60: * The JVM will record optimization information about the current application
> 61: * into the AOT cache file app.aot. In a future execution of this application,
We don't strictly generate the info into `app.aot` - we record it and then do an assembly phase (either implicitly with AOTCacheOutput or explicitly with AOTMode=) to generate the cache:
Suggestion:
* The JVM will record optimization information about the current application
* that will be used to generate the AOT cache file app.aot. In a future execution of this application,
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28010#discussion_r2469810111
PR Review Comment: https://git.openjdk.org/jdk/pull/28010#discussion_r2469813837
PR Review Comment: https://git.openjdk.org/jdk/pull/28010#discussion_r2469821133
More information about the jmx-dev
mailing list