8130115: REDO - 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-08-14 10:10:35 -07:00
parent 4694fbd776
commit 65a39ab028
11 changed files with 36 additions and 23 deletions

View file

@ -405,7 +405,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) \