On Fri, 12 Sep 2025 09:43:41 GMT, Paul Hübner <[email protected]> wrote:

> Hi all, 
> 
> This PR refactors the mark word to use the order of bits as specified in [JEP 
> 450](https://openjdk.org/jeps/450). 
> 
> Specifically, there are three portions to this change:
> - Moving the age bits lower to their intended position.
> - Fixing a miscompilation in the native `hashCode` intrinsic that got 
> unearthed as a result.
> - Updating the documentation to be more inline with the mainline docs and 
> minimal Valhalla additions.
> 
> Feedback is welcome, especially for the doc changes. If there are any ideas 
> of other places in which similar miscompilations could occur, that would be 
> valuable to know as well.

Looks good to me. Good job investigating and fixing this!

src/hotspot/share/opto/library_call.cpp line 5369:

> 5367:     // We cannot use the inline type mask as this may check bits that 
> are overriden
> 5368:     // by an object monitor's pointer when inflating locking.
> 5369:     Node *lock_mask      = _gvn.MakeConX(markWord::lock_mask_in_place);

FTR, this merge commit broke it: 
https://github.com/openjdk/valhalla/commit/0e3418df579fa7d2c6f56b4064656a8223f362db

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

Marked as reviewed by thartmann (Committer).

PR Review: 
https://git.openjdk.org/valhalla/pull/1578#pullrequestreview-3292786797
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1578#discussion_r2397302008

Reply via email to