On Thu, 27 Aug 2026 08:31:35 GMT, Johan Sjölen <[email protected]> wrote:

>> src/hotspot/share/oops/markWord.hpp line 76:
>> 
>>> 74: //    * valhalla reserved: Reserved for future use
>>> 75: //
>>> 76: //    Inline types cannot be locked and have a deterministic identity 
>>> hash based
>> 
>> You should split this into two sentences to make the meaning clearer.
>> 
>> 
>> // Inline types cannot be locked.
>> // They have a deterministic hash based on the immutable payload and class, 
>> which may be cached in the markWord.
>> 
>> 
>> Otherwise, it sounds like when they are locked their hash is  
>> non-deterministic.
>
> It's weird to call it an identity hash as well, so I removed the word 
> "identity" from the comment.

Yeah. I think this ties into what @stefank wrote about using `identity_hash()` 
on value types. We probably want to split these calls on the oopDesc interface 
having something like `hash`, `identity_hash` and `value_hash`. And have the 
markWord just talk about the `hash`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32535#discussion_r3870122945

Reply via email to