hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Frame.java
changeset 13728 882756847a04
parent 13391 30245956af37
child 30590 14f7f48c1377
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Frame.java	Fri Aug 31 16:39:35 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Frame.java	Sat Sep 01 13:25:18 2012 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -72,8 +72,8 @@
       });
   }
 
-  /** Size of constMethodOopDesc for computing BCI from BCP (FIXME: hack) */
-  private static long    constMethodOopDescSize;
+  /** Size of ConstMethod for computing BCI from BCP (FIXME: hack) */
+  private static long    ConstMethodSize;
 
   private static int pcReturnOffset;
 
@@ -82,10 +82,10 @@
   }
 
   private static synchronized void initialize(TypeDataBase db) {
-    Type constMethodOopType = db.lookupType("constMethodOopDesc");
+    Type ConstMethodType = db.lookupType("ConstMethod");
     // FIXME: not sure whether alignment here is correct or how to
     // force it (round up to address size?)
-    constMethodOopDescSize = constMethodOopType.getSize();
+    ConstMethodSize = ConstMethodType.getSize();
 
     pcReturnOffset = db.lookupIntConstant("frame::pc_return_offset").intValue();
   }
@@ -97,7 +97,7 @@
     if (bcp == null) return 0;
     long bci = bcp.minus(null);
     if (bci >= 0 && bci < cm.getCodeSize()) return (int) bci;
-    return (int) (bcp.minus(cm.getHandle()) - constMethodOopDescSize);
+    return (int) (bcp.minus(cm.getAddress()) - ConstMethodSize);
   }
 
   protected int bcpToBci(Address bcp, Method m) {
@@ -285,7 +285,7 @@
   // NOTE that the accessor "addressOfInterpreterFrameBCX" has
   // necessarily been eliminated. The byte code pointer is inherently
   // an interior pointer to a Method (the bytecodes follow the
-  // methodOopDesc data structure) and therefore acquisition of it in
+  // Method data structure) and therefore acquisition of it in
   // this system can not be allowed. All accesses to interpreter frame
   // byte codes are via the byte code index (BCI).
 
@@ -374,7 +374,7 @@
 
   /** Current method */
   public Method            getInterpreterFrameMethod() {
-    return (Method) VM.getVM().getObjectHeap().newOop(addressOfInterpreterFrameMethod().getOopHandleAt(0));
+    return (Method)Metadata.instantiateWrapperFor(addressOfInterpreterFrameMethod().getAddressAt(0));
   }
 
   /** Current method */
@@ -385,7 +385,7 @@
   public abstract Address  addressOfInterpreterFrameCPCache();
   /** Constant pool cache */
   public ConstantPoolCache getInterpreterFrameCPCache() {
-    return (ConstantPoolCache) VM.getVM().getObjectHeap().newOop(addressOfInterpreterFrameCPCache().getOopHandleAt(0));
+    return (ConstantPoolCache) Metadata.instantiateWrapperFor(addressOfInterpreterFrameCPCache().getAddressAt(0));
   }
 
   //--------------------------------------------------------------------------------
@@ -583,8 +583,9 @@
     //    }
 
     // process fixed part
-    oopVisitor.visitAddress(addressOfInterpreterFrameMethod());
-    oopVisitor.visitAddress(addressOfInterpreterFrameCPCache());
+    // FIXME: these are no longer oops, so should anything be visitied?
+    // oopVisitor.visitAddress(addressOfInterpreterFrameMethod());
+    // oopVisitor.visitAddress(addressOfInterpreterFrameCPCache());
 
     // FIXME: expose interpreterFrameMirrorOffset
     //    if (m.isNative() && m.isStatic()) {