8240124: Better VM Interning

Reviewed-by: rehn, pliden, smarks, rhalade, ahgross, jwilhelm
This commit is contained in:
Coleen Phillimore 2020-04-28 12:07:35 -04:00 committed by Henry Jen
parent fa25d083be
commit a5cb23e29f
8 changed files with 365 additions and 286 deletions

View file

@ -91,11 +91,11 @@ static size_t _current_size = 0;
static volatile size_t _items_count = 0;
volatile bool _alt_hash = false;
static juint murmur_seed = 0;
static uint64_t _alt_hash_seed = 0;
uintx hash_string(const jchar* s, int len, bool useAlt) {
return useAlt ?
AltHashing::murmur3_32(murmur_seed, s, len) :
AltHashing::halfsiphash_64(_alt_hash_seed, s, len) :
java_lang_String::hash_code(s, len);
}
@ -523,7 +523,7 @@ void StringTable::rehash_table() {
return;
}
murmur_seed = AltHashing::compute_seed();
_alt_hash_seed = AltHashing::compute_seed();
{
if (do_rehash()) {
rehashed = true;