< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Symbol.java

Print this page

        

@@ -43,11 +43,11 @@
       });
   }
 
   private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
     Type type  = db.lookupType("Symbol");
-    length     = type.getCIntegerField("_length");
+    length     = type.getCIntegerField("_length_and_refcount");
     baseOffset = type.getField("_body").getOffset();
     idHash = type.getCIntegerField("_identity_hash");
   }
 
   // Format:

@@ -73,11 +73,14 @@
 
   // Fields
   private static CIntegerField length;
 
   // Accessors for declared fields
-  public long   getLength() { return          length.getValue(this.addr); }
+  public long   getLength() {
+    int i = (int)length.getValue(this.addr);
+    return (i >> 16);
+  }
 
   public byte getByteAt(long index) {
     return addr.getJByteAt(baseOffset + index);
   }
   // _identity_hash is a short
< prev index next >