[lworld] RFR: 8332886: [lworld] TestBasicFunctionality::test21 counts incorrectly
Tobias Hartmann
thartmann at openjdk.org
Fri May 16 12:30:14 UTC 2025
On Thu, 15 May 2025 17:19:46 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
> Hi,
>
> The issue here is that the test counts incorrectly, the test looks like this:
>
> val1 = MyValue1.createWithFieldsInline(x, y);
> val2 = MyValue2.createWithFieldsInline(x, rD);
> val4 = MyValue1.createWithFieldsInline(x, y);
>
> All of these are reference fields since they are nullable and `MyValue1` and `MyValue2` are both very large. `MyValue1` has an identity field `int[] oa`, so `val1` and `val4` cannot be commoned. As a result, there should be 4 allocations: `val1`, `val4`, `val1.v4` , and `val2`.
>
> Please take a look and leave your reviews, thanks a lot.
Thanks for looking into this. The fix looks good to me.
-------------
Marked as reviewed by thartmann (Committer).
PR Review: https://git.openjdk.org/valhalla/pull/1457#pullrequestreview-2846480654
More information about the valhalla-dev
mailing list