On Wed, 26 Aug 2026 18:09:12 GMT, Stefan Karlsson <[email protected]> wrote:

>> Axel Boldt-Christmas has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Update Inline type identity hash comment
>
> src/hotspot/share/oops/oop.cpp line 125:
> 
>> 123: 
>> 124:   // Calculate the new hash
>> 125:   const intptr_t new_hash = ObjectSynchronizer::get_next_hash(current, 
>> this);  // get a new hash
> 
> If you moved the `FastHashCode` implementation to oop.cpp, I think it would 
> make a lot of sense to also move the `get_next_hash` implementation here.

Yeah, but probably want to do this in a future RFE which cleans up our 5 
different hashing modes. This part is just concerned with installing a hash in 
the object. But `get_next_hash` has a bunch of dependencies to global state 
which is updated by deflation IIRC.

> src/hotspot/share/oops/oop.cpp line 132:
> 
>> 130: 
>> 131:     // Try to install the hash
>> 132:     mark = cas_set_mark(new_mark, old_mark, memory_order_relaxed);
> 
> Pre-existing: We tend to stay away from rewriting the value for input 
> arguments, to make it easier to read the code. It would be nice if this could 
> be rewritten to follow that unwritten guideline. We can discuss that as a 
> potential follow-up.

I'll fix it, just have to pick a name for the input parameter.

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

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

Reply via email to