[master] RFR: OMWorld: Cleanup ObjectMonitor::_header
Stefan Karlsson
stefank at openjdk.org
Tue Apr 23 13:09:47 UTC 2024
On Mon, 22 Apr 2024 13:20:33 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
> This changes the `ObjectMonitor::_header` to `ObjectMonitor::_metadata` and cleans up the surrounding terminology.
>
> Parts of this could be upstreamed, but the distinction of this field between the different locking modes is introduced in OMWorld.
>
> This patch will conflict with Lilliput if rebased on-top of OMWorld because Lilliput introduces `static ByteSize header_offset()` which is not used after OMWorld. They could probably be removed in both these patches.
>
> This also changes all the fields to have the same access level (private) so that this can be a standard layout type.
src/hotspot/share/runtime/objectMonitor.hpp line 137:
> 135: // Enforced by the assert() in metadata_addr().
> 136: // * LM_LIGHTWEIGHT
> 137: // Contains the _objects hashCode.
Suggestion:
// Contains the _object's hashCode.
src/hotspot/share/runtime/objectMonitor.hpp line 146:
> 144: // inflation. The _object does not change, so it is a good choice to share
> 145: // its cache line with _metadata.
> 146: DEFINE_PAD_MINUS_SIZE(0, OM_CACHE_LINE_SIZE, sizeof(volatile uintptr_t) +
Could this be using `sizeof(_metadata)` instead?
-------------
PR Review Comment: https://git.openjdk.org/lilliput/pull/161#discussion_r1576211448
PR Review Comment: https://git.openjdk.org/lilliput/pull/161#discussion_r1576220813
More information about the lilliput-dev
mailing list