On Thu, 16 Apr 2026 07:20:23 GMT, David Holmes <[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.

I don't think it is important here. The check_hashmaps_for_heapwalk is called 
once during heapwalking operation which is extremely slow already.

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

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

Reply via email to