RFR: 8316180: Thread-local backoff for secondary_super_cache updates [v5]
Aleksey Shipilev
shade at openjdk.org
Wed Sep 27 16:45:16 UTC 2023
On Wed, 27 Sep 2023 16:08:08 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Denser AArch64
>
> src/hotspot/share/runtime/javaThread.cpp line 417:
>
>> 415: _vm_result_2(nullptr),
>> 416:
>> 417: _backoff_secondary_super_miss(0),
>
> Why don't you set it to `SecondarySuperMissBackoff` instead?
>
> With the proposed shape of `MacroAssembler::check_klass_subtype_slow_path()` (`if ((x = (x-1)) >= 0) {... slow path ... }`, an overflow happens on the first access. It has an unfortunate consequence that '== 0' doesn't work anymore and, moreover, signed comparison is needed.
Yeah, I guess there is no point in not initializing to `SSMB` right away. I was thinking that the first update should be accepted, as slowpath is probably correct in the optimistic case, and only the bad cases should pay. But given how this counter is shared by all callsites, that point is likely moot. Changed in new commit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15718#discussion_r1338899835
More information about the hotspot-dev
mailing list