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

Vladimir Ivanov vlivanov at openjdk.org
Thu Jul 18 19:59:35 UTC 2024


On Thu, 18 Jul 2024 16:35:16 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> On a second thought the following setter may be the culprit:
>> 
>> void Klass::set_secondary_supers(Array<Klass*>* secondaries) {
>>   assert(!UseSecondarySupersTable || secondaries == nullptr, "");
>>   set_secondary_supers(secondaries, SECONDARY_SUPERS_BITMAP_EMPTY);
>> }
>> 
>> It should be adjusted to set `SECONDARY_SUPERS_BITMAP_FULL` instead.
>
> I've spent a while trying to reproduce the problem but I can't. 
> 
> I was seeing a problem where `Klass::is_subtype_of(vmClasses::Cloneable_klass())` was being called before the bitmap had been set. I'm not sure what to think, really. Maybe I should just back out this change to see what happens.

I'm in favor of backing out this change and adding an assert/guarantee (on `_secondary_supers != nullptr`) in `Klass::is_subtype_of()` to ensure no subtype checks happen on uninitialized Klasses. Then we should be able to spot and fix all the places where problematic checks happen.

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

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


More information about the core-libs-dev mailing list