APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.management.internal

public Class HotSpotAOTCacheImpl

extends Object
implements HotSpotAOTCacheMXBean
Class Inheritance
All Implemented Interfaces
jdk.management.HotSpotAOTCacheMXBean, java.lang.management.PlatformManagedObject
Imports
javax.management.ObjectName, jdk.management.HotSpotAOTCacheMXBean, sun.management.Util, .VMManagement

Implementation class for the AOT Cache subsystem. ManagementFactory.getRuntimeMXBean() returns an instance of this class.

Field Summary

Modifier and TypeField and Description
private final VMManagement

Constructor Summary

AccessConstructor and Description
pack-priv
HotSpotAOTCacheImpl(VMManagement vm)

Constructor of HotSpotAOTCacheImpl class.

Method Summary

Modifier and TypeMethod and Description
public boolean
endRecording()

Implements jdk.management.HotSpotAOTCacheMXBean.endRecording.

If an AOT recording is in progress, ends the recording.

public ObjectName
getObjectName()

Implements java.lang.management.PlatformManagedObject.getObjectName.

Returns an ObjectName instance representing the object name of this platform managed object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

jvmback to summary
private final VMManagement jvm

Constructor Detail

HotSpotAOTCacheImplback to summary
pack-priv HotSpotAOTCacheImpl(VMManagement vm)

Constructor of HotSpotAOTCacheImpl class.

Method Detail

endRecordingback to summary
public boolean endRecording()

Implements jdk.management.HotSpotAOTCacheMXBean.endRecording.

Doc from jdk.management.HotSpotAOTCacheMXBean.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 endRecording method is called. Examples:

$java -XX:AOTCacheOutput=app.aot ....

The JVM records optimization information for the current application in the AOT cache file app.aot. In a future run of the application, the option -XX:AOTCache=app.aot will cause the JVM to use the cache to improve the application's startup and warmup performance.

$java -XX:AOTMode=record -XX:AOTConfiguration=app.aotconfig ....

The JVM records optimization information for the current application in the AOT configuration file app.aotconfig. Subsequently, an AOT cache file can be created with the command:

$java -XX:AOTMode=create -XX:AOTConfiguration=app.aotconfig -XX:AOTCache=app.aot ...

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 -XX:AOTCacheOutput. There are also no APIs to query whether an AOT recording is in progress, or what AOT artifacts are being recorded.

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.

getObjectNameback to summary
public ObjectName getObjectName()

Implements java.lang.management.PlatformManagedObject.getObjectName.

Doc from java.lang.management.PlatformManagedObject.getObjectName.

Returns an ObjectName instance representing the object name of this platform managed object.