RFR: 8261954: Dependencies: Improve iteration over class hierarchy under context class
Coleen Phillimore
coleenp at openjdk.java.net
Fri Feb 19 13:00:43 UTC 2021
On Fri, 19 Feb 2021 12:00:20 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> src/hotspot/share/oops/instanceKlass.hpp line 1486:
>>
>>> 1484: }
>>> 1485: };
>>> 1486:
>>
>> The _subklass and _next_sibling fields and implementation are in Klass (klass.hpp/cpp) but I always wonder why they are not in InstanceKlass (instanceKlass.hpp/cpp). If this new class is in instanceKlass.hpp, these fields should be in the same. If you agree, we should file an RFE and I will move them. If the fields truly belong in klass.hpp, then this should be there too. ie. they should match.
>
> I think it's `java.lang.Object` which complicates things. All array classes are rooted at Object, so neither `_subklass` nor `_next_sibling` can be changed to `InstanceKlass`. I put `ClassHierarchyIterator` in `instanceKlass.hpp` primarily because it accepts only `InstanceKlass` root class. But I'm fine with putting it into `klass.hpp`.
Does the compiler dependencies use the _subklass lists for array classes? The only other use for this is vtable reinitialization. It is fine to leave ClassHIerarchyIterator in instanceKlass.hpp since that's how it's used in this change. I might investigate this more some later time.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2630
More information about the hotspot-compiler-dev
mailing list