RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter
Andrew Haley
aph at openjdk.org
Thu Jul 18 16:39:33 UTC 2024
On Wed, 17 Jul 2024 18:54:32 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> Now it starts to sound concerning... `Klass::set_secondary_supers()` initializes both `_secondary_supers` and `_bitmap` which implies that `Klass::is_subtype_of()` may be called on not yet initialized Klass. It that's the case, it does look like a bug on its own. How is it expected to work when `_secondary_supers` hasn't been set yet?
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19989#discussion_r1683174591
More information about the core-libs-dev
mailing list