[lworld] RFR: 8352647: [lworld] Remove larval InlineTypeNode in Unsafe intrinsics [v3]
Jatin Bhateja
jbhateja at openjdk.org
Wed Apr 2 01:30:22 UTC 2025
On Tue, 1 Apr 2025 17:50:00 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> Hi,
>>
>> As a step of #1405, I would like to remove the usage of larval value objects in `Unsafe` intrinsics. This patch also tries to make sure that `Unsafe::makePrivateBuffer` and `Unsafe::finishPrivateBuffer` are always inlined, so that larval objects do not cross call boundaries except for invoking object constructors.
>>
>> Please take a look and review this PR, thanks a lot.
>
> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>
> add test
Hi @merykitty ,
Patch looks good to me.
Thanks for clarifications and clearly spelling out UNSAFE semantics in https://bugs.openjdk.org/browse/JDK-8353236
Best Regards,
Jatin
test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestIntrinsics.java line 1694:
> 1692: U.putInt(v, X_OFFSET, i);
> 1693: }
> 1694: U.putInt(v, X_OFFSET, rI);
Here, crash occurs becausethe compiler expects to receive an InlineTypeNode for value type objects, since we are now buffering this value in make private buffer hence we hit following assertion failure
https://github.com/openjdk/valhalla/blob/lworld/src/hotspot/share/opto/parse1.cpp#L1789
FTR, this test does not capture a scenario where we merge a larval and non-larval value as depicted by the following case, but can hit the assertion failure.
https://github.com/user-attachments/files/19501609/unsafe_access.txt
-------------
Marked as reviewed by jbhateja (Committer).
PR Review: https://git.openjdk.org/valhalla/pull/1406#pullrequestreview-2734344080
PR Review Comment: https://git.openjdk.org/valhalla/pull/1406#discussion_r2023874442
More information about the valhalla-dev
mailing list