RFR: 8369736 - Add management interface for AOT cache creation [v8]

Kevin Walls kevinw at openjdk.org
Wed Nov 26 12:54:50 UTC 2025


On Wed, 26 Nov 2025 12:23:26 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Sure, I'm just pointing out that we have a load of existing nameToMBeanMap() methods that do things differently.
>> OK I now see this one is doing what the new VirtualThreadSchedulerMXBean did.
>> 
>> The others are different: commonly the nameToMBeanMap() methods in PlatformMBeanProviderImpl.java are synchronized, or they call a getXXMXBean() method which is synchronized.
>> 
>> Maybe these old methods don't need to be synchronized, if this all gets done at startup in PlatformMBeanProviderImpl init(), the mbeans will always be created once.
>
> The older code pre-dates unmodifiable maps (JEP 269), it could be modernized some time.

Thanks yes would be good to do that some time.
It looks like an effort with the older accesors to enforce that they are singletons.  That may not be important for all the mxbeans.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28010#discussion_r2564893489


More information about the hotspot-dev mailing list