RFR: 8310239: Add missing cross modifying fence in nmethod entry barriers [v2]
Erik Österlund
eosterlund at openjdk.org
Fri Oct 20 13:53:29 UTC 2023
On Tue, 10 Oct 2023 04:24:05 GMT, Dean Long <dlong at openjdk.org> wrote:
> Wouldn't it be better to put a cross_modify_fence() at the end of BarrierSetNMethod::nmethod_entry_barrier()? I don't see any code patching after that. Then we don't need it in the platform-specific generate_method_entry_barrier(). And the cross_modify_fence() could be condition depending on if code was actually patched, which it sounds like doesn't happen on aarch64 unless Generational ZGC is used?
That's a good point. Perhaps BarrierSetNMethod::nmethod_stub_entry_barrier is the better place though, as we sometimes call the nmethod entry barrier from the runtime.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14543#issuecomment-1772778461
More information about the hotspot-dev
mailing list