RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter [v23]
Dean Long
dlong at openjdk.org
Mon Oct 14 19:28:14 UTC 2024
On Mon, 14 Oct 2024 11:01:29 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> src/hotspot/share/oops/klass.cpp line 406:
>>
>>> 404: }
>>> 405: assert(i == secondaries->length(), "mismatch");
>>> 406: postcond((int)population_count(bitmap) <= secondaries->length());
>>
>> This helps explain my confusion reading fallback_search_secondary_supers(). Could we refer to this invariant there? And could this be strengthened to :
>> `population_count(bitmap) == secondaries->length() || (population_count(bitmap) == SECONDARY_SUPERS_TABLE_SIZE && secondaries->length() > SECONDARY_SUPERS_TABLE_SIZE)`
>> ?
>
> We can't assert that here, because at this point we know `length <= SECONDARY_SUPERS_TABLE_SIZE - 2`.
Doesn't that mean `population_count(bitmap) == secondaries->length()`?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19989#discussion_r1799980535
More information about the hotspot-dev
mailing list