< prev index next >

src/hotspot/share/classfile/stringTable.cpp

Print this page

        

*** 56,67 **** // We prefer short chains of avg 2 const double PREF_AVG_LIST_LEN = 2.0; // 2^24 is max size const size_t END_SIZE = 24; ! // If a chain gets to 100 something might be wrong ! const size_t REHASH_LEN = 100; // If we have as many dead items as 50% of the number of bucket const double CLEAN_DEAD_HIGH_WATER_MARK = 0.5; #if INCLUDE_CDS_JAVA_HEAP inline oop read_string_from_compact_hashtable(address base_address, u4 offset) { --- 56,67 ---- // We prefer short chains of avg 2 const double PREF_AVG_LIST_LEN = 2.0; // 2^24 is max size const size_t END_SIZE = 24; ! // If a chain gets to 32 something might be wrong ! const size_t REHASH_LEN = 32; // If we have as many dead items as 50% of the number of bucket const double CLEAN_DEAD_HIGH_WATER_MARK = 0.5; #if INCLUDE_CDS_JAVA_HEAP inline oop read_string_from_compact_hashtable(address base_address, u4 offset) {
*** 494,506 **** bool StringTable::do_rehash() { if (!_local_table->is_safepoint_safe()) { return false; } ! // We use current size, not max size. ! size_t new_size = _local_table->get_size_log2(Thread::current()); ! StringTableHash* new_table = new StringTableHash(new_size, END_SIZE, REHASH_LEN); // Use alt hash from now on _alt_hash = true; if (!_local_table->try_move_nodes_to(Thread::current(), new_table)) { _alt_hash = false; delete new_table; --- 494,505 ---- bool StringTable::do_rehash() { if (!_local_table->is_safepoint_safe()) { return false; } ! // We use max size ! StringTableHash* new_table = new StringTableHash(END_SIZE, END_SIZE, REHASH_LEN); // Use alt hash from now on _alt_hash = true; if (!_local_table->try_move_nodes_to(Thread::current(), new_table)) { _alt_hash = false; delete new_table;
< prev index next >