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

Chad Rakoczy duke at openjdk.org
Fri Jul 11 20:33:49 UTC 2025


On Thu, 10 Jul 2025 00:07:01 GMT, Dean Long <dlong at openjdk.org> wrote:

> Why not have a new fix_relocation_after_xxx() that is platform-specific? For most platforms it can just delegate to fix_relocation_after_move()

I think adding a new `fix_relocation_after_xxx()` might be a bit overkill, since every case except one would just delegate to `fix_relocation_after_move()` anyway. The trampoline handling logic already lives in the shared code `trampoline_stub_Relocation::fix_relocation_after_move`, which calls `pd_fix_owner_after_move` and handles the platform specific scenarios. Since this only comes up during nmethod relocation, I think it makes more sense to keep that logic within the nmethod relocation code itself.

This change also keeps all existing code untouched so there isn't a concern about affecting `CodeBuffer::relocate_code_to()`

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

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


More information about the hotspot-compiler-dev mailing list