Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/sun/management/CompilerThreadStat.java
38827 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*/29public class CompilerThreadStat implements java.io.Serializable {30private String name;31private long taskCount;32private long compileTime;33private MethodInfo lastMethod;3435CompilerThreadStat(String name, long taskCount, long time, MethodInfo lastMethod) {36this.name = name;37this.taskCount = taskCount;38this.compileTime = time;39this.lastMethod = lastMethod;40};4142/**43* Returns the name of the compiler thread associated with44* this compiler thread statistic.45*46* @return the name of the compiler thread.47*/48public String getName() {49return name;50}5152/**53* Returns the number of compile tasks performed by the compiler thread54* associated with this compiler thread statistic.55*56* @return the number of compile tasks performed by the compiler thread.57*/58public long getCompileTaskCount() {59return taskCount;60}6162/**63* Returns the accumulated elapsed time spent by the compiler thread64* associated with this compiler thread statistic.65*66* @return the accumulated elapsed time spent by the compiler thread.67*/68public long getCompileTime() {69return compileTime;70}7172/**73* Returns the information about the last method compiled by74* the compiler thread associated with this compiler thread statistic.75*76* @return a {@link MethodInfo} object for the last method77* compiled by the compiler thread.78*/79public MethodInfo getLastCompiledMethodInfo() {80return lastMethod;81}8283public String toString() {84return getName() + " compileTasks = " + getCompileTaskCount()85+ " compileTime = " + getCompileTime();86}8788private static final long serialVersionUID = 6992337162326171013L;8990}919293