RFR: 8320318: ObjectMonitor Responsible thread [v2]

Coleen Phillimore coleenp at openjdk.org
Tue Sep 17 14:22:10 UTC 2024


On Tue, 17 Sep 2024 13:27:36 GMT, Fredrik Bredberg <fbredberg at openjdk.org> wrote:

>> src/hotspot/share/runtime/objectMonitor.cpp line 920:
>> 
>>> 918:   // To that end, the exit() operation must have at least STST|LDST
>>> 919:   // "release" barrier semantics.  Specifically, there must be at least a
>>> 920:   // STST|LDST barrier in exit() before the ST of null into _owner that drops
>> 
>> This sentence: Is the membar before or after the ST that drops the lock?
>
> It's the release barrier before the store that drops the lock. I'ts described [here](https://github.com/openjdk/jdk/blob/d2c6db2b9673ab8381bc7c86ada90da552350cb8/src/hotspot/share/runtime/objectMonitor.cpp#L1104).

Ok, thanks. I get it mixed up with the membar(StoreLoad) fence after storing null to the owner field. Nothing to change. I was just checking.

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

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


More information about the hotspot-dev mailing list