RFR: 8180450: secondary_super_cache does not scale well [v12]
Andrew Haley
aph at openjdk.org
Fri Apr 12 09:00:47 UTC 2024
On Fri, 12 Apr 2024 07:48:30 GMT, Dean Long <dlong at openjdk.org> wrote:
>> Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:
>>
>> JDK-8180450: secondary_super_cache does not scale well
>
> src/hotspot/cpu/aarch64/aarch64.ad line 3666:
>
>> 3664: Label miss;
>> 3665: C2_MacroAssembler _masm(&cbuf);
>> 3666: __ mov(result_reg, 1);
>
> I couldn't figure out what this is doing. It looks like result_reg is always R5 and will always be non-zero after check_klass_subtype_slow_path.
Ah yes, that's true. This is a change I made during some experiments to reorganize check_klass_subtype_slow_path.
My experiments were failing tests in appaarently-random ways, and eventually I discovered that there was an almost-undocumented assumption that R5 would always be set to something nonzero. My change did a check on the bitmap, then branched to the failure label. Doing that didn't work if the contents of R5 were previously zero. The code is misleading: result_reg (R5) is passed to check_klass_subtype_slow_path as temp2_reg, with no indication that the caller _requires_ that `temp2_reg` must be set. So `temp2_reg` isn't just a temp, it's also an output.
I should add a couple of comments and remove this mov instruction.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18309#discussion_r1562257598
More information about the hotspot-dev
mailing list