RFR: 8267947: CI: Preserve consistency between has_subklass() and is_subclass_of()
Vladimir Ivanov
vlivanov at openjdk.java.net
Tue Jun 1 08:11:20 UTC 2021
On Tue, 1 Jun 2021 07:20:43 GMT, Roland Westrelin <roland at openjdk.org> wrote:
>> CI caches `Klass::subklass() != NULL` query, but concurrent class loading can
>> invalidate the cached value. Though recorded dependency won't let the nmethod
>> to be installed, the inconcistency can manifest as type paradoxes until
>> compilation is finished.
>>
>> The fix caches only `true` value (since it can't change unless class unloading
>> takes place) and queries the VM otherwise.
>>
>> Testing:
>> - [x] hs-tier1 - hs-tier6
>
> src/hotspot/share/ci/ciKlass.cpp line 82:
>
>> 80:
>> 81: #ifdef ASSERT
>> 82: if (that->is_instance_klass() && !that->is_interface()) {
>
> Why the !that->is_interface() test?
`ciInstanceKlass::has_subklass()` is always `false` for interfaces because they always have `Klass::_subklass == NULL`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4269
More information about the hotspot-compiler-dev
mailing list