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

Axel Boldt-Christmas aboldtch at openjdk.org
Wed Sep 4 09:09:19 UTC 2024


On Wed, 4 Sep 2024 06:34:51 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:

>> src/hotspot/cpu/s390/macroAssembler_s390.cpp line 6255:
>> 
>>> 6253:       // check for match.
>>> 6254:       z_cg(obj, Address(tmp1));
>>> 6255:       z_bre(monitor_found);
>> 
>> Are we sure there are at least three (this one and two unrolled) non-null cache entries?
>
> 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.

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

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


More information about the hotspot-dev mailing list