- All Superinterfaces:
PlatformManagedObject
The management and monitoring interface for the virtual machine's compilation
functionality.
If the virtual machine has a compilation system enabled, precisely one
instance of this interface will be made available to management clients.
Otherwise, there will be no instances of this MXBean
available.
Accessing this MXBean
can be done in one of three ways.
- Invoking the static ManagementFactory.getCompilationMXBean() method.
- Using a javax.management.MBeanServerConnection.
- Obtaining a proxy MXBean from the static
ManagementFactory.newPlatformMXBeanProxy(javax.management.MBeanServerConnection, java.lang.String, java.lang.Class<T>)
method, passing in the string "java.lang:type=Compilation" for the value of the second parameter.
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Returns the name of the virtual machine's Just In Time (JIT) compiler.long
If supported (seeisCompilationTimeMonitoringSupported()
), returns the total number of milliseconds spent by the virtual machine performing compilations.boolean
A boolean indication of whether or not the virtual machine supports the timing of its compilation facilities.Methods declared in interface java.lang.management.PlatformManagedObject
getObjectName
-
Method Details
-
getName
String getName()Returns the name of the virtual machine's Just In Time (JIT) compiler.- Returns:
- the name of the JIT compiler
-
getTotalCompilationTime
long getTotalCompilationTime()If supported (seeisCompilationTimeMonitoringSupported()
), returns the total number of milliseconds spent by the virtual machine performing compilations. The figure is taken over the lifetime of the virtual machine.- Returns:
- the compilation time in milliseconds
- Throws:
UnsupportedOperationException
- if the virtual machine does not support compilation monitoring. This can be tested by calling theisCompilationTimeMonitoringSupported()
method.
-
isCompilationTimeMonitoringSupported
boolean isCompilationTimeMonitoringSupported()A boolean indication of whether or not the virtual machine supports the timing of its compilation facilities.- Returns:
true
if compilation timing is supported, otherwisefalse
.
-