diff --git a/agent/src/share/classes/sun/jvm/hotspot/ci/ciMethod.java b/agent/src/share/classes/sun/jvm/hotspot/ci/ciMethod.java index 3468b0d65142c2ba2635c39531b2976815d612d8..d50e36c2a74ee245d709687a77a5d754cb4382bf 100644 --- a/agent/src/share/classes/sun/jvm/hotspot/ci/ciMethod.java +++ b/agent/src/share/classes/sun/jvm/hotspot/ci/ciMethod.java @@ -97,8 +97,8 @@ public class ciMethod extends ciMetadata { holder.getName().asString() + " " + OopUtilities.escapeString(method.getName().asString()) + " " + method.getSignature().asString() + " " + - method.getInvocationCounter() + " " + - method.getBackedgeCounter() + " " + + method.getInvocationCount() + " " + + method.getBackedgeCount() + " " + interpreterInvocationCount() + " " + interpreterThrowoutCount() + " " + instructionsSize()); diff --git a/agent/src/share/classes/sun/jvm/hotspot/oops/Method.java b/agent/src/share/classes/sun/jvm/hotspot/oops/Method.java index c61d58dc429aa796b6932aaf377dba0764ce1498..e039470f8017cc9bae181d7f26328beddcce0e1f 100644 --- a/agent/src/share/classes/sun/jvm/hotspot/oops/Method.java +++ b/agent/src/share/classes/sun/jvm/hotspot/oops/Method.java @@ -24,15 +24,21 @@ package sun.jvm.hotspot.oops; -import java.io.*; -import java.util.*; -import sun.jvm.hotspot.code.*; -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.interpreter.*; -import sun.jvm.hotspot.memory.*; -import sun.jvm.hotspot.runtime.*; -import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.utilities.*; +import java.io.PrintStream; +import java.util.Observable; +import java.util.Observer; + +import sun.jvm.hotspot.code.NMethod; +import sun.jvm.hotspot.debugger.Address; +import sun.jvm.hotspot.interpreter.OopMapCacheEntry; +import sun.jvm.hotspot.runtime.SignatureConverter; +import sun.jvm.hotspot.runtime.VM; +import sun.jvm.hotspot.runtime.VMObjectFactory; +import sun.jvm.hotspot.types.AddressField; +import sun.jvm.hotspot.types.Type; +import sun.jvm.hotspot.types.TypeDataBase; +import sun.jvm.hotspot.types.WrongTypeException; +import sun.jvm.hotspot.utilities.Assert; // A Method represents a Java method @@ -132,11 +138,13 @@ public class Method extends Metadata { public long getAccessFlags() { return accessFlags.getValue(this); } public long getCodeSize() { return getConstMethod().getCodeSize(); } public long getVtableIndex() { return vtableIndex.getValue(this); } - public long getInvocationCounter() { - return getMethodCounters().getInvocationCounter(); + public long getInvocationCount() { + MethodCounters mc = getMethodCounters(); + return mc == null ? 0 : mc.getInvocationCounter(); } - public long getBackedgeCounter() { - return getMethodCounters().getBackedgeCounter(); + public long getBackedgeCount() { + MethodCounters mc = getMethodCounters(); + return mc == null ? 0 : mc.getBackedgeCounter(); } // get associated compiled native method, if available, else return null. @@ -349,8 +357,8 @@ public class Method extends Metadata { holder.getName().asString() + " " + OopUtilities.escapeString(getName().asString()) + " " + getSignature().asString() + " " + - getInvocationCounter() + " " + - getBackedgeCounter() + " " + + getInvocationCount() + " " + + getBackedgeCount() + " " + interpreterInvocationCount() + " " + interpreterThrowoutCount() + " " + code_size); diff --git a/agent/src/share/classes/sun/jvm/hotspot/oops/MethodData.java b/agent/src/share/classes/sun/jvm/hotspot/oops/MethodData.java index a397ec353ac2779e3df36ebd9544f2614a78954b..eb643483fe5ef8cc5613b615cf1334fac9bc70e9 100644 --- a/agent/src/share/classes/sun/jvm/hotspot/oops/MethodData.java +++ b/agent/src/share/classes/sun/jvm/hotspot/oops/MethodData.java @@ -316,8 +316,8 @@ public class MethodData extends Metadata { int iic = method.interpreterInvocationCount(); if (mileage < iic) mileage = iic; - long ic = method.getInvocationCounter(); - long bc = method.getBackedgeCounter(); + long ic = method.getInvocationCount(); + long bc = method.getBackedgeCount(); long icval = ic >> 3; if ((ic & 4) != 0) icval += CompileThreshold;