RFR: 8316694: Implement relocation of nmethod within CodeCache [v24]
Chad Rakoczy
duke at openjdk.org
Thu Jul 24 20:50:06 UTC 2025
On Thu, 19 Jun 2025 23:54:20 GMT, Chad Rakoczy <duke at openjdk.org> wrote:
>>> We still need this check in the event that there is a direct call that no longer reaches.
>>
>> OK, I didn't realize that was what Relocation::pd_set_call_destination() was doing. I think it would be better for the CPU-specific code to take care of that, rather than the shared code. We already have functions like NativeCall::set_destination_mt_safe() that do the right thing regarding trampolines. I think this could be refactored into a commonm function that Relocation::pd_set_call_destination() could also use. Sorry for the churn, but hopefully we are converging on a solution. I thought I had done the refactoring for 8321509, but it looks like I went with the simply fix at the time of adding a parameter to set_destination_mt_safe() to make it lock-free.
>
> Thanks for the suggestion. I updated to use `set_destination_mt_safe()` instead ([reference](https://github.com/openjdk/jdk/pull/23573/commits/b02e8bdb63db8042418b92ade4a26647e4e2dd8b))
This change has been reverted. Trampolines are responsible for fixing their owners so this is no longer needed
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23573#discussion_r2229542873
More information about the hotspot-compiler-dev
mailing list