8087143: Reduce Symbol::_identity_hash to 2 bytes

Convert Symbol::_identity_hash from integer to short integer to save two bytes. Also change identity_hash() to have 'this' and first two bytes of symbol join the calculation.

Reviewed-by: iklam, coleenp, shade
This commit is contained in:
Yumin Qi 2015-06-29 13:48:55 -07:00
parent df34232add
commit 037958ba9a
4 changed files with 19 additions and 21 deletions

View file

@ -403,7 +403,7 @@ typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
nonstatic_field(ObjArrayKlass, _element_klass, Klass*) \
nonstatic_field(ObjArrayKlass, _bottom_klass, Klass*) \
volatile_nonstatic_field(Symbol, _refcount, short) \
nonstatic_field(Symbol, _identity_hash, int) \
nonstatic_field(Symbol, _identity_hash, short) \
nonstatic_field(Symbol, _length, unsigned short) \
unchecked_nonstatic_field(Symbol, _body, sizeof(jbyte)) /* NOTE: no type */ \
nonstatic_field(TypeArrayKlass, _max_length, int) \