RFR: 8290969: DumpClassListCLDClosure incorrectly uses ResizeableResourceHashtable
Ioi Lam
iklam at openjdk.org
Mon Jul 25 20:50:01 UTC 2022
On Mon, 25 Jul 2022 18:13:23 GMT, Evgeny Astigeevich <duke at openjdk.org> wrote:
> `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.
Thanks for fixing this. The changes look good to me.
-------------
Marked as reviewed by iklam (Reviewer).
PR: https://git.openjdk.org/jdk/pull/9632
More information about the hotspot-runtime-dev
mailing list