--- old/src/hotspot/share/classfile/stringTable.hpp 2017-11-28 17:15:11.597889022 +0100 +++ new/src/hotspot/share/classfile/stringTable.hpp 2017-11-28 17:15:11.333889031 +0100 @@ -76,6 +76,13 @@ static unsigned int hash_string(oop string); static unsigned int alt_hash_string(const jchar* s, int len); + // Accessors for the string roots in the hashtable entries. + // Use string_object_no_keepalive() only when the value is not returned + // outside of a scope where a thread transition is possible. + static oop string_object(HashtableEntry* entry); + static oop string_object_no_keepalive(HashtableEntry* entry); + static void set_string_object(HashtableEntry* entry, oop string); + StringTable() : RehashableHashtable((int)StringTableSize, sizeof (HashtableEntry)) {}