[lworld] RFR: 8376221: [lworld] Do not store array of InlineLayoutInfo for all InstanceKlasses [v5]
Joel Sikström
jsikstro at openjdk.org
Mon Feb 2 09:53:08 UTC 2026
On Thu, 29 Jan 2026 22:00:25 GMT, Frederic Parain <fparain at openjdk.org> wrote:
>> Joel Sikström has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 11 additional commits since the last revision:
>>
>> - Merge branch 'lworld' into JDK-8376221_inlinelayoutinfo_array_optimization
>> - LayoutKind assertion for flat fields
>> - Remove mention of 'warning' in comment
>> - Exception check should really be an assert
>> - Move inlineable check to static helper
>> - Comment for second CLEAR_PENDING_EXCEPTION
>> - Clear exception before setting inline klass
>> - Split assert in field sorting methods
>> - IOOB assert message
>> - InstanceKlass instead of Klass for set_inline_layout_info_klass
>> - ... and 1 more: https://git.openjdk.org/valhalla/compare/a9b993c8...b934da63
>
> src/hotspot/share/classfile/classFileParser.cpp line 6396:
>
>> 6394: }
>> 6395:
>> 6396: void ClassFileParser::set_inline_layout_info_klass(int field_index, InstanceKlass* klass, TRAPS) {
>
> This method could take an InlineKlass* argument instead of an InstanceKlass* argument, because InlineLayoutInfo can only store information about flat value fields.
Sure, I'll move the `InlineKlass::cast()` from insdide the method to the callers instead.
> src/hotspot/share/classfile/fieldLayoutBuilder.cpp line 111:
>
>> 109: ili != nullptr &&
>> 110: ili->adr_at((int)fieldinfo.index())->klass() != nullptr &&
>> 111: !ili->adr_at((int)fieldinfo.index())->klass()->is_identity_class()) {
>
> To be inlineable, the class should not be abstract.
>
> !ili->adr_at((int)fieldinfo.index())->klass()->is_abstract()
>
> would exclude both abstract value classes and interfaces.
Yes! I'll append that to the checks.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1966#discussion_r2753463390
PR Review Comment: https://git.openjdk.org/valhalla/pull/1966#discussion_r2753463575
More information about the valhalla-dev
mailing list