RFR: 8357619: [JVMCI] Revisit phantom_ref parameter in JVMCINMethodData::get_nmethod_mirror [v2]
Doug Simon
dnsimon at openjdk.org
Mon Jun 2 16:42:36 UTC 2025
On Fri, 30 May 2025 16:05:23 GMT, Tom Rodriguez <never at openjdk.org> wrote:
>> 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
>
> src/hotspot/share/jvmci/jvmciRuntime.cpp line 801:
>
>> 799:
>> 800: void JVMCINMethodData::invalidate_nmethod_mirror(nmethod* nm) {
>> 801: if (_nmethod_mirror_index == -1) {
>
> This part is actually wrong as that's the first part of `get_nmethod_mirror` and we must always check that `get_nmethod_mirror` doesn't return nullptr. I'd assumed that the mirror was always non-null if `_nmethod_mirror_index != -1` but that's not true. The slot is reserved for all non-default nmethods and must stay around so that `translate` can work.
Fixed: https://github.com/openjdk/jdk/pull/25488/commits/7456988a6fcab00bf13e602553f9e5a295d75b0f
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25488#discussion_r2121658848
More information about the hotspot-compiler-dev
mailing list