RFR: 8160821: VarHandle accesses are penalized when argument conversion is required [v6]
Chen Liang
liach at openjdk.org
Mon Dec 8 02:08:37 UTC 2025
On Thu, 4 Dec 2025 01:55:57 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> I don't think we can use a SoftReference here if we need to achieve constant folding.
>>
>> Looking at inline_reference_get0, I think we might introduce another field property to trust a reference (potentially in an array) if both that reference and the referent within the reference is non-null. I think that belongs to a separate RFE. What do you think?
>
> Then it makes sense to limit the caching to safe cases only for now. Otherwise, it would functionally regress due to a possible memory leak.
I have added a primitive checking system to ensure safety for most cases and added a unit test to ensure there is no memory leak due to this cache.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28585#discussion_r2596829153
More information about the hotspot-compiler-dev
mailing list