RFR: 8292170: Convert CodeRootSetTable to use ResourceHashtable [v6]
Leo Korinth
lkorinth at openjdk.org
Thu Jan 12 18:09:20 UTC 2023
On Thu, 12 Jan 2023 12:56:51 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 incrementally with one additional commit since the last revision:
>
> revert copyright year after changes
Although I have no test problems, I am still looking into stuff that worries me. My worries are around the code cache methods that do *not* use locks (`contains` and `nmethods_do`). The earlier hash table used used `Atomic::release_store(&_entry, l)`. Interleaved (non-locked) accesses might now pick bad pointers (the reason why I removed `contains` from `add`). I will update you on my findings...
-------------
PR: https://git.openjdk.org/jdk/pull/11675
More information about the hotspot-dev
mailing list