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

Chad Rakoczy duke at openjdk.org
Mon Jul 21 23:51:36 UTC 2025


On Mon, 21 Jul 2025 22:40:32 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> src/hotspot/share/code/nmethod.cpp line 1406:
>> 
>>> 1404:     _oop_maps                   = nm.oop_maps()->clone();
>>> 1405:   }
>>> 1406:   _relocation_size              = nm._relocation_size;
>> 
>> Did you consider to use `memcpy()` and update only changed fields?
>
> You did not answered my question adout using `memcpy

I had changed the implementation to use `memcpy()` instead but as @fisk pointed out in https://github.com/openjdk/jdk/pull/23573#issuecomment-2797120660 it was easier to accidentally copy a value unintentionally so I reverted that change

> > >  I'm worried about copying the nmethod epoch counters  
> >
> > We should clear them. If not, it is a bug.
>
> I'd like to change copying from opt-out to opt-in instead; that would make me feel more comfortable.

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

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


More information about the hotspot-compiler-dev mailing list