RFR: 8238174: migrate ObjectMonitor::_owner field away from C++ volatile semantics
Daniel D.Daugherty
dcubed at openjdk.java.net
Tue Nov 17 22:53:10 UTC 2020
On Tue, 17 Nov 2020 22:47:41 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> Drop volatile from the ObjectMonitor::_owner field. Update all naked
>> field loads to use the new owner_raw() accessor or the existing
>> owner_is_DEFLATER_MARKER() accessor.
>
> Gory details and background:
>
> Note: Previous work updated the setters to use appropriate Atomic operations:
>
> JDK-8236035 refactor ObjectMonitor::set_owner() and _owner field setting
>
> Note: Previous work also updated the owner() accessor to check for the
> DEFLATER_MARKER value and return NULL. Those existing calls to owner()
> did not need to know about the DEFLATER_MARKER value so we hid it from
> those code sites.
>
> To verify that all uses of ObjectMonitor::_owner were found and converted,
> I temporarily changed the `_owner` field to `_ownerX` and updated the
> expected `_owner` field uses to `_ownerX`. The resulting JDK built in
> release, fastdebug and slowdebug configs.
@coleenp and @dholmes-ora - I believe the two of you motivated the
creation of this RFE so please chime in when you get the chance.
@stefank - You may also be interested in this PR...
-------------
PR: https://git.openjdk.java.net/jdk/pull/1278
More information about the hotspot-runtime-dev
mailing list