On Thu, 13 Nov 2025 19:55:24 GMT, Mat Carter <[email protected]> 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
src/jdk.management/share/classes/com/sun/management/internal/PlatformMBeanProviderImpl.java
line 192:
> 190: HotSpotAOTCacheMXBean impl = this.impl;
> 191: if (impl == null) {
> 192: this.impl = impl = new
> HotSpotAOTCacheImpl(ManagementFactoryHelper.getVMManagement());
This assignment is unusual. Are we trying to avoid a synchronized block? Other
nameToMBeanMap() methods are like:
return Collections.singletonMap(ManagementFactory.MEMORY_MXBEAN_NAME,
ManagementFactoryHelper.getMemoryMXBean());
..where the ManagementFactoryHelper.getMemoryMXBean() method is synchronized
and creates the impl if needed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28010#discussion_r2559762899