RFR: 8338995: New Object to ObjectMonitor mapping: PPC64 implementation [v3]

Martin Doerr mdoerr at openjdk.org
Wed Sep 18 10:42:22 UTC 2024


On Wed, 18 Sep 2024 09:51:34 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

>> Martin Doerr has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Remove empty line.
>>  - Improve register usage and readability.
>
> src/hotspot/cpu/ppc/macroAssembler_ppc.cpp line 2878:
> 
>> 2876:       ld(tmp2, in_bytes(ObjectMonitor::recursions_offset()), monitor);
>> 2877:       addi(tmp2, tmp2, 1);
>> 2878:       std(tmp2, in_bytes(ObjectMonitor::recursions_offset()), monitor);
> 
> Can you replace the if-statement with the following?
> 
> Suggestion:
> 
>       assert_different_registers(tmp2, monitor);
>       int offset = in_bytes(ObjectMonitor::recursions_offset()) - (UseObjectMonitorTable ? 0 : monitor_tag);
>       ld(tmp2, offset, monitor);
>       addi(tmp2, tmp2, 1);
>       std(tmp2, offset, monitor);

Is `monitor` initialized as needed if `!UseObjectMonitorTable`? I can't see it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20922#discussion_r1764825189


More information about the hotspot-dev mailing list