On Tue, 10 Mar 2026 09:43:38 GMT, Ivan Walulya <[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

This looks much more correct. Thanks for fixing this.

Just a comment on the test refactoring.

test/hotspot/jtreg/runtime/valhalla/inlinetypes/UnsafeTest.java line 103:

> 101:         Value3 v3 = new Value3(v2, List.of("Value3"));
> 102:         long off_o = U.objectFieldOffset(Value3.class, "o");
> 103:         long off_v = U.objectFieldOffset(Value3.class, "v2");

Maybe change this to `off_v2`. 

_It is the same offset as the one added below._
https://github.com/openjdk/valhalla/pull/2213/changes#diff-4067ce8ee796cd3702d2d8d69e847c6a5f4446613c87350b8e9bb422840d7489R136

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

Marked as reviewed by aboldtch (Committer).

PR Review: 
https://git.openjdk.org/valhalla/pull/2213#pullrequestreview-3943506052
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2213#discussion_r2930754024

Reply via email to