< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java

Print this page

        

@@ -438,17 +438,16 @@
 
   private Address addressOfInterpreterFrameBCX() {
     return addressOfStackSlot(INTERPRETER_FRAME_BCX_OFFSET);
   }
 
-  public int getInterpreterFrameBCI() {
+  public Address getInterpreterFrameBCP() {
     // FIXME: this is not atomic with respect to GC and is unsuitable
     // for use in a non-debugging, or reflective, system. Need to
     // figure out how to express this.
 
-    Address methodHandle = addressOfInterpreterFrameMethod().getAddressAt(0);
-    Method method = (Method)Metadata.instantiateWrapperFor(methodHandle);
+    Method method = getInterpreterFrameMethod();
     Address bcp = addressOfInterpreterFrameBCX().getAddressAt(0);
 
     // If we are in the top level frame then the bcp may have been set for us. If so then let it
     // take priority. If we are in a top level interpreter frame, the bcp is live in R13 (on x86_64)
     // and not saved in the BCX stack slot.

@@ -459,10 +458,16 @@
         if (method.getConstMethod().isAddressInMethod(live_bcp)) {
             bcp = live_bcp;
         }
     }
 
+    return bcp;
+  }
+
+  public int getInterpreterFrameBCI() {
+    Address bcp = getInterpreterFrameBCP();
+    Method method = getInterpreterFrameMethod();
     return bcpToBci(bcp, method);
   }
 
   public Address addressOfInterpreterFrameMDX() {
     return addressOfStackSlot(INTERPRETER_FRAME_MDX_OFFSET);
< prev index next >