RFR: 8320318: ObjectMonitor Responsible thread [v2]

Coleen Phillimore coleenp at openjdk.org
Mon Sep 16 16:57:13 UTC 2024


On Wed, 11 Sep 2024 13:11:32 GMT, Fredrik Bredberg <fbredberg at openjdk.org> wrote:

>> src/hotspot/share/runtime/objectMonitor.cpp line 588:
>> 
>>> 586:       } else {
>>> 587:         // The lock had been free momentarily, but we lost the race to the lock.
>>> 588:         own = prev_own;
>> 
>> So this retries now and doesn't break.  Is it because it could be the DEFLATER_MARKER ?
>
> It could be the deflator (or someone else). Anyhow, we will retry.

Now that I'm reading the code more slowly, I see that the reason for this loop is the deflator.  Can you add this to this comment, so I can read this faster next time :)

     // The lock had been free momentarily, but we lost the race to the lock. Retry in case the lock was acquired by the deflator.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19454#discussion_r1761449963


More information about the hotspot-dev mailing list