Path: blob/master/src/java.management/share/classes/sun/management/CompilerThreadStat.java
41152 views
/*1* Copyright (c) 2003, 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 sun.management;2627/**28*/29@Deprecated30public class CompilerThreadStat implements java.io.Serializable {31private String name;32private long taskCount;33private long compileTime;34private MethodInfo lastMethod;3536CompilerThreadStat(String name, long taskCount, long time, MethodInfo lastMethod) {37this.name = name;38this.taskCount = taskCount;39this.compileTime = time;40this.lastMethod = lastMethod;41};4243/**44* Returns the name of the compiler thread associated with45* this compiler thread statistic.46*47* @return the name of the compiler thread.48*/49public String getName() {50return name;51}5253/**54* Returns the number of compile tasks performed by the compiler thread55* associated with this compiler thread statistic.56*57* @return the number of compile tasks performed by the compiler thread.58*/59public long getCompileTaskCount() {60return taskCount;61}6263/**64* Returns the accumulated elapsed time spent by the compiler thread65* associated with this compiler thread statistic.66*67* @return the accumulated elapsed time spent by the compiler thread.68*/69public long getCompileTime() {70return compileTime;71}7273/**74* Returns the information about the last method compiled by75* the compiler thread associated with this compiler thread statistic.76*77* @return a {@link MethodInfo} object for the last method78* compiled by the compiler thread.79*/80public MethodInfo getLastCompiledMethodInfo() {81return lastMethod;82}8384public String toString() {85return getName() + " compileTasks = " + getCompileTaskCount()86+ " compileTime = " + getCompileTime();87}8889private static final long serialVersionUID = 6992337162326171013L;9091}929394