RFR: Prototype AOTMXBean

Alan Bateman alanb at openjdk.org
Fri Apr 18 08:31:04 UTC 2025


On Thu, 17 Apr 2025 20:49:41 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> > AOT is a JDK feature rather than standard feature so you might want to think of making it JDK specific, in jdk.management, rather than as a standard MXBean.
> 
> Is there any difference in terms of visibility between java.management vs jdk.management? Aer both modules visible by default in a standard JDK build?

Both modules export APIs so both modules will be resolved by default when the initial module is the "class path". Running with -Dcom.sun.management.jmxremote doesn't change that.

They will also be resolved when the initial module is a named module, e.g. java -m app, even if app doesn't transitively depends on java.management or jdk.management. This is because of services and specifically java.management provides an implementation of JAAS LoginModule that can be used by java.base, and jdk.management provides additional platform MXBeans that can be used by java.management.

So nothing here where the initial module or command line options will cause a concern. 

In any case, I think this MXBean is best prototyped in the jdk.management module, and in the jdk.management package. VirtualThreadSchedulerMXBean was recently added to this module. In JMX speak, that MXBean defines several attributes and an operation to control the scheduler. The proposal in this MXBean maps to 3 attributes and an operation to stop recording.

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

PR Comment: https://git.openjdk.org/leyden/pull/52#issuecomment-2814915857


More information about the leyden-dev mailing list