8269986: Remove +3 from Symbol::identity_hash()

Reviewed-by: coleenp
This commit is contained in:
Ioi Lam 2021-11-10 20:22:41 +00:00
parent 2374abda19
commit df02daa6f9

View File

@ -155,7 +155,7 @@ class Symbol : public MetaspaceObj {
// Returns the largest size symbol we can safely hold.
static int max_length() { return max_symbol_length; }
unsigned identity_hash() const {
unsigned addr_bits = (unsigned)((uintptr_t)this >> (LogBytesPerWord + 3));
unsigned addr_bits = (unsigned)((uintptr_t)this >> LogBytesPerWord);
return ((unsigned)extract_hash(_hash_and_refcount) & 0xffff) |
((addr_bits ^ (length() << 8) ^ (( _body[0] << 8) | _body[1])) << 16);
}