--- old/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Symbol.java 2018-07-18 23:08:50.024706321 -0400 +++ new/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Symbol.java 2018-07-18 23:08:49.804706329 -0400 @@ -45,7 +45,7 @@ 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"); } @@ -75,7 +75,10 @@ private static CIntegerField length; // Accessors for declared fields - public long getLength() { return length.getValue(this.addr); } + public long getLength() { + long i = length.getValue(this.addr); + return (i >> 16) & 0xffff; + } public byte getByteAt(long index) { return addr.getJByteAt(baseOffset + index);