RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter

Vladimir Ivanov vlivanov at openjdk.org
Wed Jul 17 18:48:33 UTC 2024


On Wed, 17 Jul 2024 17:13:49 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> Another observation while browsing the code: `_secondary_supers_bitmap` would be a better name. (Same considerations apply to `_hash_slot`.)
>
> This is because the C++ runtime does secondary super cache lookups even before the bitmap has been calculated and the hash table sorted. In this case the bitmap is zero, so teh search thinks there are no secondary supers. Setting _bitmap to SECONDARY_SUPERS_BITMAP_FULL forces a linear search.
> 
> I guess there might be a better way to do this. Perhaps a comment is needed?
> 
> I agree about `_secondary_supers_bitmap` name.

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?

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

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


More information about the core-libs-dev mailing list