RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter [v23]

Andrew Haley aph at openjdk.org
Thu Oct 10 11:03:17 UTC 2024


On Wed, 9 Oct 2024 21:04:07 GMT, Dean Long <dlong at openjdk.org> wrote:

>> Andrew Haley has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 61 commits:
>> 
>>  - Merge from 4ff72dc57e65e99b129f0ba28196994edf402018
>>  - Fix s390
>>  - Use post-incrememnt RegSet operator.
>>  - Merge branch 'clean' into JDK-8331658-work
>>  - Fix merge
>>  - Merge branch 'clean' into JDK-8331658-work
>>  - Merge from JDK head.
>>  - Cleanup
>>  - Fix shared code
>>  - Fix shared code
>>  - ... and 51 more: https://git.openjdk.org/jdk/compare/4ff72dc5...a7612674
>
> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 1446:
> 
>> 1444:   sub(rscratch1, super_check_offset, in_bytes(Klass::secondary_super_cache_offset()));
>> 1445:   if (L_failure == &L_fallthrough) {
>> 1446:     cbz(rscratch1, *L_slow_path);
> 
> What's the reason for changing to cbz/cbnz from subs and branching on condition codes?

When I was porting this code to AArch64, I mostly used x86_64 as my reference. In order to minimize the number of errors, I avoided AArch64 instructions such as `cbz`. That's no longer an issue, so we can use AArch64 idioms like this, which avoid the x86 problem of accidentally clobbering flags by not using flags except where necessary. I don't think there's a performance difference.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19989#discussion_r1795204086


More information about the hotspot-dev mailing list