[lilliput-jdk17u:lilliput] RFR: 8308011: [Lilliput/JDK17] Use narrow i-hash only when +UseCompactObjectHeaders

Aleksey Shipilev shade at openjdk.org
Mon May 15 10:05:15 UTC 2023


On Fri, 12 May 2023 15:09:58 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> Currently, we use a narrow 25bit identity-hash-code in Lilliput. That is even the case when running without compact object headers, even though we could just as well use the original 31bit identity hash-code then.
> 
> The fix is relatively simple. This is a backport of https://github.com/openjdk/lilliput/pull/93. Also, this brings the code in line with what we're currently proposing in upstream https://github.com/openjdk/jdk/pull/13844.
> 
> Testing:
>  - [x] tier1 +UseCompactObjectHeaders
>  - [ ] tier2 +UseCompactObjectHeaders
>  - [x] tier1 -UseCompactObjectHeaders
>  - [ ] tier2 -UseCompactObjectHeaders

Looks fine, with a comprehension question.

src/hotspot/share/oops/markWord.hpp line 155:

> 153:   static const int age_shift                      = self_forwarded_shift + self_forwarded_bits;
> 154:   static const int unused_gap_shift               = age_shift + age_bits;
> 155:   static const int hash_shift                     = unused_gap_shift + unused_gap_bits;

This moves `hash_shift` back to upstream state, right? Looks to me that way.

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

Marked as reviewed by shade (Reviewer).

PR Review: https://git.openjdk.org/lilliput-jdk17u/pull/16#pullrequestreview-1426209089
PR Review Comment: https://git.openjdk.org/lilliput-jdk17u/pull/16#discussion_r1193616252


More information about the lilliput-dev mailing list