RFR: 8292596: Make SymbolHashMap a ResourceHashtable [v2]
David Holmes
dholmes at openjdk.org
Fri Aug 19 03:24:49 UTC 2022
On Thu, 18 Aug 2022 15:28:29 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Please review this straightforward change to use ResourceHashtable for SymbolHashMap, which is used by the Class File Reconstituter. The table maps Symbol* to constant pool indices for loaded classes (Symbol refcounting unnecessary as the class is not unloaded because it's in use).
>> Tested with jvmti tests locally and tier 1-3.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove comment.
These simplifications looks great.
A couple of drive-by- comments, one of which is we really should decide on table versus map in the naming here.
Thanks.
src/hotspot/share/oops/constantPool.hpp line 923:
> 921: void add_entry(const Symbol* sym, u2 value) {
> 922: bool created;
> 923: _table.put_if_absent(sym, value, &created);
Pre-existing: Just an observation but it is very poor API naming to have `add_entry` when the semantics are actually `add_if_absent`.
-------------
Marked as reviewed by dholmes (Reviewer).
PR: https://git.openjdk.org/jdk/pull/9917
More information about the hotspot-dev
mailing list