RFR: 8316694: Implement relocation of nmethod within CodeCache [v15]

Tom Rodriguez never at openjdk.org
Wed May 14 16:01:57 UTC 2025


On Wed, 14 May 2025 08:38:50 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

>> src/hotspot/share/jvmci/jvmciRuntime.cpp line 852:
>> 
>>> 850: 
>>> 851: void JVMCINMethodData::relocate_nmethod_mirror(nmethod* nm) {
>>> 852:   oop nmethod_mirror = get_nmethod_mirror(nm, /* phantom_ref */ false);
>> 
>> Why is phantom false?
>
> I assume that's copied from `JVMCINMethodData::invalidate_nmethod_mirror` which was updated in https://github.com/openjdk/jdk/commit/f81c192da929d72be5134ccf195be2a985737504. The description for [JDK-8234359](https://bugs.openjdk.org/browse/JDK-8234359) implies that this somehow avoids enqueuing potentially dead object to the SATB buffer. Is that what we want here @tkrodriguez ?

It should be passing true here as we are not in the middle of a GC so it should be alive and valid.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/23573#discussion_r2089274697


More information about the hotspot-compiler-dev mailing list