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

Leo Korinth lkorinth at openjdk.org
Thu Jan 26 10:35:52 UTC 2023


On Tue, 24 Jan 2023 21:59:44 GMT, Leo Korinth <lkorinth at openjdk.org> wrote:

>> I am replacing the old hash table with ResourceHashtable. In the process I am also removing the redundant `_length` field. By removing the `_length` field, a lot of asserts can be removed as the length will trivially match the length of the underlying table.
>> 
>> I would like to have feedback on the addition of `unlink_destruct(Function&& should_remove)`. I added it because I prefer to use a functor object that can be used by lambdas instead of an iterator object. However, I did add code to "destruct" resource objects when they are removed instead of just letting them be to reflect that we use `delete` on c-heap objects. Maybe I should remove this "improvement" and then maybe implement the function by calling the existing unlink?
>
> Leo Korinth has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits:
> 
>  - Merge branch '_master_jdk' into _8292170
>  - include cleanups, test fix
>  - Remove the purge list and use the resizing of the resource hash
>    table.
>    
>    Add asserts ensuring that we do not mutatet a hash table while we
>    iterate over it. Renaming .*g1CodeCacheRemSet.?pp -> .*g1CodeRootSet.?pp
>  - code_roots_list_contains is now locked, but we have problems with add() during nmethods_do
>  - revert copyright year after changes
>  - add mem_size() method to resourceHash.hpp
>  - can not use contains in combination with add without a lock
>  - remove specialized hash
>  - inline g1CodeRootSetTable.hpp
>  - remove unused template
>  - ... and 3 more: https://git.openjdk.org/jdk/compare/b678e700...6e1832a2

Many thanks for the review work Ivan, Ioi and Coleen!!!

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

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


More information about the hotspot-dev mailing list