--- old/agent/src/share/classes/sun/jvm/hotspot/memory/SymbolTable.java 2015-01-29 18:58:02.787721555 -0500 +++ new/agent/src/share/classes/sun/jvm/hotspot/memory/SymbolTable.java 2015-01-29 18:58:02.147684941 -0500 @@ -44,15 +44,22 @@ private static synchronized void initialize(TypeDataBase db) { Type type = db.lookupType("SymbolTable"); theTableField = type.getAddressField("_the_table"); + sharedTableField = type.getAddressField("_shared_table"); } // Fields private static AddressField theTableField; + private static AddressField sharedTableField; + + private CompactHashTable sharedTable; // Accessors public static SymbolTable getTheTable() { Address tmp = theTableField.getValue(); - return (SymbolTable) VMObjectFactory.newObject(SymbolTable.class, tmp); + SymbolTable table = (SymbolTable) VMObjectFactory.newObject(SymbolTable.class, tmp); + Address shared = sharedTableField.getStaticFieldAddress(); + table.sharedTable = (CompactHashTable)VMObjectFactory.newObject(CompactHashTable.class, shared); + return table; } public SymbolTable(Address addr) { @@ -76,16 +83,19 @@ anyway. Returns null if the given string is not in the symbol table. */ public Symbol probe(byte[] name) { + Symbol sym; long hashValue = hashSymbol(name); for (HashtableEntry e = (HashtableEntry) bucket(hashToIndex(hashValue)); e != null; e = (HashtableEntry) e.next()) { if (e.hash() == hashValue) { - Symbol sym = Symbol.create(e.literalValue()); + sym = Symbol.create(e.literalValue()); if (sym.equals(name)) { return sym; } } } - return null; + + sym = sharedTable.probe(name, hashValue); + return sym; } public interface SymbolVisitor {