On Wed, 15 Apr 2026 23:07:56 GMT, Leonid Mesnik <[email protected]> wrote:

> The check_hashmap(nullptr) doesn't do anything now.
> It was used to rehash map but now just returns.
> 
> And the remaining usage can be replaced with direct call of 
> remove_dead_entries_locked.
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This does seem unnecessary when called with nullptr certainly.  It appears that 
remove_dead_entries_locked also checks if needs_cleanup and if ObjectFree 
events should be posted.  Looks like a nice cleanup.
As Serguei says, this code has been very fragile but the jvmti/jdi tests should 
verify if this is okay.  Also run with ZGC stress options like 
-XX:ZCollectionInterval=1 or 0.1 I think.

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

Marked as reviewed by coleenp (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/30757#pullrequestreview-4132379269

Reply via email to