RFR: 8290969: DumpClassListCLDClosure incorrectly uses ResizeableResourceHashtable

Evgeny Astigeevich duke at openjdk.org
Mon Jul 25 18:20:32 UTC 2022


`ResizeableResourceHashtable` is an open hashing table which can be resized to improve search performance. It provides `maybe_grow(load_factor)` function for this purpose. To use this functionality an instance of `ResizeableResourceHashtable` must be correctly created and used:
- The non-zero maximum table size must be specified in the constructor.
- The default or a reasonable load factor must be used in `maybe_grow(load_factor)`.

`DumpClassListCLDClosure` does not meet these requirements:
- The maximum table size is not provided.
- The call of `maybe_grow(61333)` is used. The call will work when `number_of_entries > 61333*1987=121,868,671`. This does not look reasonable. 

This PR fixes DumpClassListCLDClosure to meet the requirements.
Tested with release/fastdebug builds:
- `gtest`: Passed.
- `tier1`: Passed.
- `test/hotspot/jtreg/runtime/cds`: Passed.

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

Commit messages:
 - 8290969: DumpClassListCLDClosure incorrectly uses ResizeableResourceHashtable

Changes: https://git.openjdk.org/jdk/pull/9632/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9632&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8290969
  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/9632.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9632/head:pull/9632

PR: https://git.openjdk.org/jdk/pull/9632


More information about the hotspot-runtime-dev mailing list