The management interface is registered with the platform MBeanServer. The ObjectName that uniquely identifies the management
interface within the MBeanServer is jdk.management:type=HotSpotAOTCache.
Direct access to the MXBean interface can be obtained with
ManagementFactory#getPlatformMXBean(Class).
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if a recording was in progress and has been ended
successfully; false otherwise.If an AOT recording is in progress, ends the recording. |
| endRecording | back to summary |
|---|---|
| public boolean endRecording() If an AOT recording is in progress, ends the recording. This method returns after the AOT artifacts have been completely written. The JVM will start recording AOT artifacts upon start-up if appropriate JVM options are
given in the command-line. The recording will stop when the JVM exits, or when
the $ The JVM records optimization information for the current application in the AOT cache file $ The JVM records optimization information for the current application in the AOT configuration file For more information about creating and using the AOT artifacts, and detailed specification of the corresponding JVM command-line options, please refer to JEP 483 and JEP 514. Currently there are no APIs to start an AOT recording. AOT recordings must be
started using JVM command-line options such as This method enables an application to end its own AOT recording programatically, but that is not necessarily the best approach. Doing so requires changing the application’s code, which might not be feasible. Even when it is feasible, injecting training-specific logic into the application reduces the similarity between training runs and production runs, potentially making the AOT cache less effective. It may be better to arrange for an external agent to end the training run, thereby creating an AOT cache without interfering with the application’s code.
| |