MXBean and jcmd to end AOT training run early
    ioi.lam at oracle.com 
    ioi.lam at oracle.com
       
    Mon Oct 20 04:39:30 UTC 2025
    
    
  
In JDK 25, the AOT training run ends only when the JVM process exits. 
This doesn't work for JVM process that run forever. Also, some users may 
want to end the training run earlier.
In Leyden we have 3 ways to end the training early. Per discussion with 
the Java community, we are upstreaming two of them to the JDK mainline, 
hopefully in JDK 26.
Please review the following CSRs to see if the proposed interfaces would 
work for your use cases:
[1] Add management interface for AOT cache creation
This adds a new jdk.management.HotSpotAOTCacheMXBean that can be used 
programmatically to end the training run.  See 
https://bugs.openjdk.org/browse/JDK-8369737
[2] Add jcmd AOT.end_training diagnostic command
This adds a jcmd to end a training. See 
https://bugs.openjdk.org/browse/JDK-8370204
***
(There's a 3rd way in Leyden to end the training run using the 
command-line option AOTEndTrainingOnMethodEntry. As the implementation 
is quite intrusive and the interface may need further refinement, we 
have decided to not upstream this to the mainline yet).
Thanks
- Ioi
    
    
More information about the leyden-dev
mailing list