Merge
authorsla
Wed, 08 May 2013 10:14:57 -0400
changeset 17363 9989d42bbb52
parent 17361 c05f257362ac (current diff)
parent 17362 d30ac6d6d655 (diff)
child 17364 cf8b9767e64c
child 17366 05beb289a844
Merge
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ci/ciMethod.java	Wed May 08 08:20:45 2013 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ci/ciMethod.java	Wed May 08 10:14:57 2013 -0400
@@ -97,8 +97,8 @@
                   holder.getName().asString() + " " +
                   OopUtilities.escapeString(method.getName().asString()) + " " +
                   method.getSignature().asString() + " " +
-                  method.getInvocationCounter() + " " +
-                  method.getBackedgeCounter() + " " +
+                  method.getInvocationCount() + " " +
+                  method.getBackedgeCount() + " " +
                   interpreterInvocationCount() + " " +
                   interpreterThrowoutCount() + " " +
                   instructionsSize());
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Method.java	Wed May 08 08:20:45 2013 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Method.java	Wed May 08 10:14:57 2013 -0400
@@ -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 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 @@
                   holder.getName().asString() + " " +
                   OopUtilities.escapeString(getName().asString()) + " " +
                   getSignature().asString() + " " +
-                  getInvocationCounter() + " " +
-                  getBackedgeCounter() + " " +
+                  getInvocationCount() + " " +
+                  getBackedgeCount() + " " +
                   interpreterInvocationCount() + " " +
                   interpreterThrowoutCount() + " " +
                   code_size);
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/MethodData.java	Wed May 08 08:20:45 2013 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/MethodData.java	Wed May 08 10:14:57 2013 -0400
@@ -316,8 +316,8 @@
     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;