RFR: 8338658: New Object to ObjectMonitor mapping: s390x implementation [v2]

Lutz Schmidt lucy at openjdk.org
Wed Sep 4 12:30:20 UTC 2024


On Wed, 4 Sep 2024 09:06:19 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

>> I couldn't find answer for that. Maybe @xmas92 can tell us about that.
>
> There are 8 cache entries, and a null sentinel at the end. All entries can be null. 
> 
> So the answer is no we can not be sure about that as one, two or three of the first three entries may be null. But I am not sure what the reason is for this question.
> 
> The non-empty/non-null entries always comes first, followed by the null entries if any, followed by a null sentinel. The unrolled entries do not check for null, only for a match. The loop will check the rest of the entries and go to a slow path when a null entry (or the null sentinel) is encountered.

Thank you , @xmas92 !
With that, the code looks correct. The unrolled iterations may find a match. All other cases are safe, no out-of-bounds. The loop iterations check for null and are thus safe as well.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20740#discussion_r1743689971


More information about the hotspot-dev mailing list