RFR: 8191786: Thread-SMR hash table size should be dynamic [v2]

Daniel D.Daugherty dcubed at openjdk.java.net
Tue May 25 21:08:35 UTC 2021


On Tue, 25 May 2021 20:39:56 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> Small change to switch Thread-SMR's hash table from ResourceHashtable to KVHashtable
>> so that a variable sized hash table is used instead of a fixed size hash table (1031 elements).
>> Also refactor common hash table size calculation code into static hash_table_size()
>> function and call it from both places.
>> 
>> Test with Mach5 Tier[1-7] testing.
>
> Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision:
> 
>   rehn CR

Here's where they are allocated and deleted:


void ThreadsSMRSupport::free_list(ThreadsList* threads) {
<snip>
  ThreadScanHashtable *scan_table = new ThreadScanHashtable(hash_table_size());
<snip>
  delete scan_table;
}

bool ThreadsSMRSupport::is_a_protected_JavaThread(JavaThread *thread) {
<snip>
  ThreadScanHashtable *scan_table = new ThreadScanHashtable(hash_table_size());
<snip>
  delete scan_table;
  return thread_is_protected;
}

-------------

PR: https://git.openjdk.java.net/jdk/pull/4168


More information about the hotspot-runtime-dev mailing list