RFR: 8320318: ObjectMonitor Responsible thread [v4]

David Holmes dholmes at openjdk.org
Sun Sep 29 07:20:40 UTC 2024


On Wed, 25 Sep 2024 19:50:53 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Whoever asked for it, let's see if this is what they wanted.  I thought the fence() comment below it is what was requested.  I agree the comment should be repeated on all platforms though for consistency.
>
> I see where it came from in the aarch64 code, and that code does a stlr() to satisfy the JMM.  It's fine.  Leave it.

To get the correct semantics for the JMM the releasing of a monitor has to have release semantics (funny that!). So setting the owner to null should be a release_store. On some platforms we get "release" semantics for free.

The fence is needed for correct operation of our own locking implementation and has nothing to do with JMM.

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

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


More information about the hotspot-dev mailing list