RFR: 8318757: VM_ThreadDump asserts in interleaved ObjectMonitor::deflate_monitor calls [v5]
David Holmes
dholmes at openjdk.org
Fri Nov 10 02:33:56 UTC 2023
On Thu, 9 Nov 2023 06:44:40 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> I think in this case we already know that all the monitors in the closure are owned by the expected owner. But I wonder if we should/can assert that?
>
> The filter accepts all monitors. The filtering that only returns owned monitors is done inside the called `owned_monitors_iterate_filtered`:
>
>
> void ObjectSynchronizer::owned_monitors_iterate_filtered(MonitorClosure* closure, OwnerFilter filter) {
> ...
> if (mid->has_owner() && filter(mid->owner_raw())) {
> ...
> closure->do_monitor(mid);
> }
>
>
> The closure is only applied to monitors that "have an owner". Maybe "owned monitors" sounds too much as if the function only visit all monitors owned by the current thread?
No I was reading too much into it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16519#discussion_r1388804233
More information about the hotspot-dev
mailing list