On Mon, 27 Jun 2022 17:01:02 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:
>> @sspitsyn Thanks. >> >> Yes, `JvmtiTagMap::check_hashmaps_for_heapwalk()` is where I saw the call >> from `VMThread`. >> >> This patch is intended to **not** post `ObjectFree` events on `VMThread`, so >> I am going to move this PR back to draft state and take another look. > >> This patch is intended to not post ObjectFree events on VMThread, so I am >> going to move this PR back to draft state and take another look. > > I'm not so sure it matters to the debug agent. I thought the main change here > was to not force posting of ObjectFree events to be deferred to the VMThread, > and to change the debug agent to send the CLASS_UNLOAD events right away > rather than accumulating them and waiting for a GCFinishEvent. Is there any > issue if the posting of ObjectFree and sending of CLASS_UNLOAD is done on the > VMThread? Hmm... I thought that is the whole purpose for delaying processing class unload events, because it can not be done on `VMThread`? Otherwise, we don't need all this complexity, just have `cbTrackingObjectFree()` calls `synthesizeUnloadEvent()` directly. ------------- PR: https://git.openjdk.org/jdk/pull/9168