RFR: 8318757: VM_ThreadDump asserts in interleaved ObjectMonitor::deflate_monitor calls [v5]

Stefan Karlsson stefank at openjdk.org
Thu Nov 9 06:54:58 UTC 2023


On Thu, 9 Nov 2023 01:20:23 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Stefan Karlsson has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Rename monitors_iterate
>
> src/hotspot/share/runtime/synchronizer.hpp line 135:
> 
>> 133: 
>> 134:   // Iterate owned ObjectMonitors.
>> 135:   static void owned_monitors_iterate(MonitorClosure* closure);
> 
> owned by whom? current thread? Does that include stack-locked or not?
> 
> Just trying to understand how the two variants of `owned_monitors_iterate` relate.

Owned by *any* thread in any way.

* `owned_monitors_iterate(MonitorClosure* closure)` - Visits all monitors with the owner set to anything that indicates that the monitor has an owner (`ObjectMonitor::has_owner()`).

* `owned_monitors_iterate(MonitorClosure* m, JavaThread* thread)` - Visits all monitors with the owner field set to the specified `thread`.

Maybe we could figure out more descriptive names for these.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16519#discussion_r1387558163


More information about the hotspot-dev mailing list