RFR: 8290892: C2: Intrinsify Reference.reachabilityFence [v3]
Vladimir Ivanov
vlivanov at openjdk.org
Wed Sep 10 22:05:51 UTC 2025
On Mon, 8 Sep 2025 13:28:10 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Good idea. Added one.
>
> Also: you promise that it happens randomly. But it seems to be added deterministically everywhere. Did I miss something?
Sorry for the confusion. Reworded the comment. I didn't intend to make it truly random. The idea was to automatically insert RF nodes during parsing to stress the implementation. It doesn't slow down compilation times that much, so aggressive insertion just works.
>> Live ranges of values are routinely extended during loop opts. And it can break the invariant that all interfering safepoints contain the referent in their oop map. (If an interfering safepoint doesn't keep the referent alive, then it becomes possible for the referent to be prematurely GCed.)
>>
>> After loop opts are over, it becomes possible to reliably enumerate all interfering safe points and ensure the referent present in their oop maps.
>
> Can you make sure this explanation is in the comment ;)
Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25315#discussion_r2334889253
PR Review Comment: https://git.openjdk.org/jdk/pull/25315#discussion_r2334855917
More information about the hotspot-compiler-dev
mailing list