RFR: 8357619: [JVMCI] Revisit phantom_ref parameter in JVMCINMethodData::get_nmethod_mirror [v2]
Tom Rodriguez
never at openjdk.org
Mon Jun 2 16:42:35 UTC 2025
On Mon, 2 Jun 2025 16:39:42 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
>> The point of the `phantom_ref` parameter (introduced by [JDK-8234359](https://bugs.openjdk.org/browse/JDK-8234359)) of `JVMCINMethodData::get_nmethod_mirror` is to avoid the special resurrection semantics of a phantom read when reading the field during GC, which is when `JVMCINMethodData::invalidate_nmethod_mirror` can be called.
>> This case can be handled directly in `JVMCINMethodData::invalidate_nmethod_mirror` and so the `phantom_ref` parameter can be removed.
>
> Doug Simon has updated the pull request incrementally with one additional commit since the last revision:
>
> still rely on get_nmethod_mirror in invalidate_nmethod_mirror
Marked as reviewed by never (Reviewer).
src/hotspot/share/jvmci/jvmciRuntime.cpp line 807:
> 805: oop nmethod_mirror = get_nmethod_mirror(nm, /* phantom_ref */ false);
> 806: if (nmethod_mirror == nullptr) {
> 807: return;
minor typo
-------------
PR Review: https://git.openjdk.org/jdk/pull/25488#pullrequestreview-2889188965
PR Review Comment: https://git.openjdk.org/jdk/pull/25488#discussion_r2121662248
More information about the hotspot-compiler-dev
mailing list