Path: blob/master/src/java.management/share/classes/java/lang/management/CompilationMXBean.java
41159 views
/*1* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package java.lang.management;2627/**28* The management interface for the compilation system of29* the Java virtual machine.30*31* <p> A Java virtual machine has a single instance of the implementation32* class of this interface. This instance implementing this interface is33* an <a href="ManagementFactory.html#MXBean">MXBean</a>34* that can be obtained by calling35* the {@link ManagementFactory#getCompilationMXBean} method or36* from the {@link ManagementFactory#getPlatformMBeanServer37* platform MBeanServer} method.38*39* <p>The {@code ObjectName} for uniquely identifying the MXBean for40* the compilation system within an MBeanServer is:41* <blockquote>42* {@link ManagementFactory#COMPILATION_MXBEAN_NAME43* java.lang:type=Compilation}44* </blockquote>45*46* It can be obtained by calling the47* {@link PlatformManagedObject#getObjectName} method.48*49* @see ManagementFactory#getPlatformMXBeans(Class)50* @see <a href="../../../javax/management/package-summary.html">51* JMX Specification.</a>52* @see <a href="package-summary.html#examples">53* Ways to Access MXBeans</a>54*55* @author Mandy Chung56* @since 1.557*/58public interface CompilationMXBean extends PlatformManagedObject {59/**60* Returns the name of the Just-in-time (JIT) compiler.61*62* @return the name of the JIT compiler.63*/64public java.lang.String getName();6566/**67* Tests if the Java virtual machine supports the monitoring of68* compilation time.69*70* @return {@code true} if the monitoring of compilation time is71* supported; {@code false} otherwise.72*/73public boolean isCompilationTimeMonitoringSupported();7475/**76* Returns the approximate accumulated elapsed time (in milliseconds)77* spent in compilation.78* If multiple threads are used for compilation, this value is79* summation of the approximate time that each thread spent in compilation.80*81* <p>This method is optionally supported by the platform.82* A Java virtual machine implementation may not support the compilation83* time monitoring. The {@link #isCompilationTimeMonitoringSupported}84* method can be used to determine if the Java virtual machine85* supports this operation.86*87* <p> This value does not indicate the level of performance of88* the Java virtual machine and is not intended for performance comparisons89* of different virtual machine implementations.90* The implementations may have different definitions and different91* measurements of the compilation time.92*93* @return Compilation time in milliseconds94* @throws java.lang.UnsupportedOperationException if the Java95* virtual machine does not support96* this operation.97*98*/99public long getTotalCompilationTime();100}101102103