On Thu, 12 Mar 2026 12:33:05 GMT, Frederic Parain <[email protected]> wrote:

>> Hi,
>> 
>> Please review this patch to add sorting to 
>> `FieldLayoutBuilder::inline_class_field_sorting`.
>> 
>> Additionally, we use `heapOopSize` to split the  big primitives and  small 
>> primitives so that we do not add inline classes with oops to small 
>> primitives and can remove `register_embedded_oops_from_list` for small 
>> primitives.
>> 
>> Testing: Tier 1-2 with --enable-preview
>
> src/hotspot/share/classfile/fieldLayoutBuilder.cpp line 990:
> 
>> 988:     if (!fieldinfo.access_flags().is_static() && field_alignment > 
>> alignment) alignment = field_alignment;
>> 989:   }
>> 990:   _root_group->sort_by_size();
> 
> Good catch on the missing sorting.
> The sorting of the _static_fields list should also be added here.

Turns out that the missing sorting is the main problem. I will update the 
description in the CR and PR.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2213#discussion_r2924337830

Reply via email to