RFR: 8338658: New Object to ObjectMonitor mapping: s390x implementation [v2]
Amit Kumar
amitkumar at openjdk.org
Thu Sep 5 07:10:55 UTC 2024
On Wed, 4 Sep 2024 13:08:04 GMT, Lutz Schmidt <lucy at openjdk.org> wrote:
>> src/hotspot/cpu/s390/macroAssembler_s390.cpp line 6030:
>>
>>> 6028: z_lghi(top, 0); // tmp1 is free at this point
>>> 6029: z_stg(top, om_cache_addr);
>>> 6030: }
>>
>> @RealLucy should I remove the else Part ? I tested on tier1 and it is not being executed, So maybe safe to remove ?
>
> I am often undecided myself. The code as it is now is correct for all displacements. If you omit the else part, you introduce a hidden dependency on the layout of BasicObjectLock and BasicLock. On the other hand, how likely is it that anybody will fundamentally change the layout and thus break the disp12 requirement? Compact or generally valid? **Your choice.**
I guess let's keep it. I mean even if there is need to change the layout, then we have to remove `z_mvghi` and switch back to this implementation again. So maybe better we keep it here and hope for the best ?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20740#discussion_r1744920346
More information about the hotspot-dev
mailing list