RFR: 8221554: aarch64 cross-modifying code
Robbin Ehn
rehn at openjdk.java.net
Fri Oct 2 07:45:21 UTC 2020
On Thu, 1 Oct 2020 13:30:23 GMT, Alan Hayward <github.com+4146708+a74nh at openjdk.org> wrote:
>> You no longer need any isb when returning from the native wrappers (interpreted or compiled variant) after my patch.
>> That *should* be 2 if the mentioned 3 hooks (without looking closely at the code). Because that will be done in the
>> runtime instead when waking up from native. Which hook do we have left?
>
> Agreed. With both patches, and with the JNI isbs removed, that leaves just one safepoint isb in the AArch64 code (plus
> the other isb in emit_static_call_stub).
> The test patch exists not just to test the AArch64 but the common code too (ideally it would be extended to other
> targets too). Are we happy that the cross_modify_fence is called at all the required points? A hole in the common code
> would fail only very rarely. It does require quite a bit of code to add this test though.
The only reason for having cmf() on thread is the validation in debug builds, right?
If you do it the opposite way:
inline void OrderAccess::cross_modify_fence_non_arch_specific() {
OrderAccess::cross_modify_fence_arch_impl();
#ifdef ASSERT
if (VerifyCrossModifyFence) {
Thread::current()->set_requires_cross_modify_fence(false);
}
#endif
}
You only need the boolean in debug builds on JavaThreads and you don't need to move the cmf() from OA and create the
new one?
-------------
PR: https://git.openjdk.java.net/jdk/pull/428
More information about the hotspot-dev
mailing list