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

Doug Simon dnsimon at openjdk.org
Wed May 14 08:42:12 UTC 2025


On Thu, 8 May 2025 21:19:37 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:

>> Chad Rakoczy has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 54 additional commits since the last revision:
>> 
>>  - Fix null check
>>  - Remove unnecessary include
>>  - Add nullptr check to relocate
>>  - Fix JVMCI nmethod data
>>  - Unexclude JVMCI methods
>>  - Add relocate_nmethod_mirror
>>  - Only hold NMethodState_lock when needed
>>  - Exclude JVMCI nmethods
>>  - Remove StressNMethodRelocation
>>  - Fix branch_range revert
>>  - ... and 44 more: https://git.openjdk.org/jdk/compare/b78b9289...9ca3563a
>
> 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 ?

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

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


More information about the hotspot-compiler-dev mailing list