On Thu, 16 Apr 2026 15:04:41 GMT, Leonid Mesnik <[email protected]> wrote:
>> 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. The another difference observed by @sspitsyn while discussing this issue. The remove_dead_entries_locked() is now called and work even if ` env()->is_enabled(JVMTI_EVENT_OBJECT_FREE)` is false. It just cleans up tagmap table, but doesn't post events. Shouldn't change behaviour observed by jvmti agent. The performance impact is not significant comparing with heap walking. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30757#discussion_r3097432712
