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).

src/hotspot/share/prims/jvmtiTagMap.cpp line 151:

> 149:       // The ZDriver may be walking the hashmaps concurrently so this 
> lock is needed.
> 150:       MutexLocker ml(tag_map->lock(), Mutex::_no_safepoint_check_flag);
> 151:       tag_map->remove_dead_entries_locked(objects);

Seems the new code no longer skips processing in the `is_empty()` case - IIUC 
that will just be an extra clearing of weak refs if anything.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30757#discussion_r3091405996

Reply via email to