< prev index next >
agent/src/share/classes/sun/jvm/hotspot/oops/Symbol.java
Print this page
@@ -45,11 +45,11 @@
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("Symbol");
length = type.getCIntegerField("_length");
baseOffset = type.getField("_body").getOffset();
- idHash = type.getCIntegerField("_identity_hash");
+ idHash = type.getJShortField("_identity_hash");
}
// Format:
// [header]
// [klass ]
@@ -79,13 +79,13 @@
public byte getByteAt(long index) {
return addr.getJByteAt(baseOffset + index);
}
- private static CIntegerField idHash;
+ private static JShortField idHash;
- public int identityHash() { return (int)idHash.getValue(this.addr); }
+ public short identityHash() { return (short)idHash.getValue(this.addr); }
public boolean equals(byte[] modUTF8Chars) {
int l = (int) getLength();
if (l != modUTF8Chars.length) return false;
while (l-- > 0) {
< prev index next >