On Wed, 2 Sep 2026 15:05:48 GMT, Fredrik Bredberg <[email protected]> wrote:

>> Since [JDK-8389325](https://bugs.openjdk.org/browse/JDK-8389325) 
>> `ObjectMonitor::_metadata` only contains a copy of the object’s hash code. 
>> But:
>> 
>> 1. A `ObjectMonitorTable` lookup get the hash directly from the object’s 
>> mark word, and ...
>> 2. ... no synchronization code uses the copy stored in the monitor.
>> 
>> Therefore this PR removes the redundant `_metadata` field and its related 
>> metadata/hash accessors, diagnostics, and serviceability support.
>> 
>> Passes tier1-5 tests successfully on supported platforms.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Fredrik Bredberg has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Updated after review

lgtm. 

This should not clash with 
[JDK-8391174](https://bugs.openjdk.org/browse/JDK-8391174), but I'd merge 
checked regardless.

Also given the `JDK-8391174` I would probably have changed all the markWord 
hash zero checks and asserts to be `[!]obj->has_identity_hash()` checks / 
asserts as it reflects the object invariants better.

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

Marked as reviewed by aboldtch (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/32573#pullrequestreview-5099140718

Reply via email to