RFR: 8338995: New Object to ObjectMonitor mapping: PPC64 implementation [v3]
Richard Reingruber
rrich at openjdk.org
Wed Sep 18 10:05:09 UTC 2024
On Fri, 13 Sep 2024 18:32:41 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
>> PPC64 implementation of [JDK-8315884](https://bugs.openjdk.org/browse/JDK-8315884).
>
> Martin Doerr has updated the pull request incrementally with two additional commits since the last revision:
>
> - Remove empty line.
> - Improve register usage and readability.
Hi Martin,
thanks for doing the port.
Have you done a little bit of performance testing with `test/micro/org/openjdk/bench/vm/lang/LockUnlock.java`?
Thanks, Richard.
src/hotspot/cpu/ppc/macroAssembler_ppc.cpp line 2825:
> 2823: for (int i = 0; i < num_unrolled; i++) {
> 2824: ld(tmp3, 0, cache_addr);
> 2825: cmpd(CCR0, tmp3, obj);
Please file a RFE to consistently use either `flag` or `CCR0`.
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);
src/hotspot/cpu/ppc/macroAssembler_ppc.cpp line 3013:
> 3011: // null check with Flags == NE, no valid pointer below alignof(ObjectMonitor*)
> 3012: cmpldi(CCR0, monitor, checked_cast<uint8_t>(alignof(ObjectMonitor*)));
> 3013: blt(CCR0, slow_path);
Please file a RFE to consistently use either `flag` or `CCR0`.
-------------
PR Review: https://git.openjdk.org/jdk/pull/20922#pullrequestreview-2310141350
PR Review Comment: https://git.openjdk.org/jdk/pull/20922#discussion_r1763476209
PR Review Comment: https://git.openjdk.org/jdk/pull/20922#discussion_r1764762441
PR Review Comment: https://git.openjdk.org/jdk/pull/20922#discussion_r1764719435
More information about the hotspot-dev
mailing list