RFR: 8291555: Implement alternative fast-locking scheme [v52]

Roman Kennke rkennke at openjdk.org
Tue Apr 4 19:09:33 UTC 2023


On Tue, 4 Apr 2023 19:01:44 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JavaVFrame.java line 85:
>> 
>>> 83:         ( // we have marked ourself as pending on this monitor
>>> 84:           mark.monitor().equals(thread.getCurrentPendingMonitor()) ||
>>> 85:           mark.monitor().isOwnedAnonymous() ||
>> 
>> Not at all clear to me how this fits here. ??
>
>> Not at all clear to me how this fits here. ??
> 
> This block checks whether the monitor is in waiting state. When it is anonymously locked it must be waiting. I added a comment.

> Given the owner could release the monitor the moment after we check I don't see how false results are an issue here. The existing code should be safe when not executed at a safepoint..

I checked again. It looks like the DeadLock test now passes even if I let the code in management.cpp go check stacks without safepoint. I believe the addition of the start_processing() to LockStack::contains() fixes the ZGC problem. But please, run the full tests again on Mach5. I don't see any failures here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/10907#discussion_r1157654320


More information about the serviceability-dev mailing list