RFR: 8292170: Convert CodeRootSetTable to use ResourceHashtable [v4]

Leo Korinth lkorinth at openjdk.org
Thu Jan 12 12:56:52 UTC 2023


On Sat, 24 Dec 2022 04:58:02 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   can not use contains in combination with add without a lock
>
> src/hotspot/share/gc/g1/g1CodeCacheRemSet.cpp line 44:
> 
>> 42:   return sizeof(*this) +
>> 43:     _table.table_size() * sizeof(Table::Node*) +
>> 44:     _table.number_of_entries() * sizeof(Table::Node);
> 
> Instead of exporting Table::Node and the details of the implementation, maybe ResourceHashtable should have a function that returns its footprint? I don't know what name we usually use for that. Maybe `ResourceHashtable::mem_size()` to follow the example of `G1CodeRootSetTable::mem_size()`?

I am back after vacation, I added a `ResourceHashtable::mem_size()`, does it look okay?

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

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


More information about the hotspot-dev mailing list