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

Vladimir Kozlov kvn at openjdk.org
Tue Mar 25 18:00:27 UTC 2025


On Tue, 25 Mar 2025 02:35:10 GMT, Dean Long <dlong at openjdk.org> wrote:

>> @vnkozlov @dean-long 
>> It looks like the only way relocation can be performed correctly only at a safepoint. GC updating oops concurrently with relocation is an issue.
>> The safepoint requirement will limit use cases of relocation. Relocations should not be done often and should be done in a batch. On another side, relocating at a safepoint will simplify clone code patching. We need to fix offsets in call instructions at call sites. We don't need to clear them.
>> What do you think?
>
> If the only issue was GC updating oops concurrently, we could try using CompiledICLocker instead of forcing a safepoint.  But now that I think about it, there are other issues, like the state of the entry barrier, and other GC epoch counters, and copying those consistently may require a safepoint and/or additional GC fixup logic.  I think we need a GC expert to weigh in here.  There may be other issues we are missing.

I agree that we should do it at safepoint to avoid obvious concurrency.

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

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


More information about the hotspot-compiler-dev mailing list