RFR: 8270059: Remove KVHashtable

Coleen Phillimore coleenp at openjdk.java.net
Thu Jul 8 19:49:57 UTC 2021


On Thu, 8 Jul 2021 04:18:22 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> There are now only 2 uses of KVHashtable in the HotSpot code. They can be easily rewritten to use ResourceHashtable and ResizeableResourceHashtable.

Nice cleanup!

src/hotspot/share/cds/archiveBuilder.hpp line 183:

> 181:   public:
> 182:     bool do_entry(address key, const SourceObjInfo& value) {
> 183:       delete value.ref();

One of the things that I thought that should change with the _src_obj_table is that SourceObjInfo should have a destructor that should call this delete.  But then the table would have to take SourceObjInfo elements and not copy from a stack object.  I think ResourceHashtable's destructor calls delete on all the nodes.  Anyway, that can be a future improvement if you've followed what I mean.

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

Marked as reviewed by coleenp (Reviewer).

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


More information about the hotspot-dev mailing list