RFR: 8332689: RISC-V: Use load instead of trampolines [v7]
Robbin Ehn
rehn at openjdk.org
Fri Jun 7 11:59:16 UTC 2024
On Fri, 7 Jun 2024 08:09:03 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove tmp file
>
> src/hotspot/cpu/riscv/relocInfo_riscv.cpp line 84:
>
>> 82: if (NativeCall::is_at(addr())) {
>> 83: NativeCall* nc = nativeCall_at(addr());
>> 84: if (nc->reloc_set_destination(x)) {
>
> Seems there is a subtle difference here. Previously, there is a cache invalidation operation in `NativeCall::set_destination_mt_safe` [1] which is called by this `Relocation::pd_set_call_destination`.
> Now it's gone with this change: it's not there even in `NativeShortCall::reloc_set_destination`.
> Is that intended?
>
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/nativeInst_riscv.cpp#L96
Yes, we do an cache flush for the entire memory after all relocations are done.
void CodeBuffer::copy_code_to(CodeBlob* dest_blob) {
...
relocate_code_to(&dest); // reloc done here
....
// Flush generated code
ICache::invalidate_range(dest_blob->code_begin(), dest_blob->code_size());
}
As we need todo this for the entire method I can't find a reason why reloc would need it?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19453#discussion_r1631091872
More information about the hotspot-dev
mailing list