java.lang.management

Interface CompilationMXBean

public interface CompilationMXBean

Provides access to information about the Just-In-Time (JIT) compiler provided by the virtual machine, if one exists. An instance of this bean is obtainable by calling {@link ManagementFactory#getCompilationMXBean()} if a JIT is available. Otherwise, the method returns null.

Since: 1.5

Method Summary
StringgetName()
Returns the name of the Just-In-Time (JIT) compiler.
longgetTotalCompilationTime()
Returns the accumulated time, in milliseconds, that the JIT compiler has spent compiling Java bytecodes to native machine code.
booleanisCompilationTimeMonitoringSupported()
Returns true if the virtual machine's JIT compiler supports monitoring of the time spent compiling.

Method Detail

getName

public String getName()
Returns the name of the Just-In-Time (JIT) compiler.

Returns: the name of the JIT compiler.

getTotalCompilationTime

public long getTotalCompilationTime()
Returns the accumulated time, in milliseconds, that the JIT compiler has spent compiling Java bytecodes to native machine code. This value represents a single time measurement for the whole virtual machine, including all multiple threads of operation. The value is not intended as a performance measurement.

Returns: the accumulated number of milliseconds the JIT compiler has spent compiling.

Throws: UnsupportedOperationException if time monitoring is not supported.

isCompilationTimeMonitoringSupported

public boolean isCompilationTimeMonitoringSupported()
Returns true if the virtual machine's JIT compiler supports monitoring of the time spent compiling.

Returns: true if the JIT compiler can be monitored for time spent compiling.