[aarch64-port-dev ] RFR: 8242029: AArch64: skip G1 array copy pre-barrier if marking not active

Erik Österlund erik.osterlund at oracle.com
Tue Apr 7 10:58:39 UTC 2020


Hi,

I think the best place to trigger the ISB is where you clear the last java frame. That happens on the exit path of all calls that may safepoint.

The worry is code that explicitly saves and restores the last java frame, and uses leaf calls, instead of using call_VM. This solves that.

Thanks,
/Erik

> On 7 Apr 2020, at 11:56, Andrew Haley <aph at redhat.com> wrote:
> 
> On 4/7/20 8:33 AM, Erik Österlund wrote:
> 
>> Note that you only need ISB when returning from call_VM, not
>> call_VM_leaf. Leaf calls can’t safepoint, and hence the ISB is
>> redundant. Arraycopy uses leaf calls. So while this optimization is
>> great for this case, maybe removing ISB fronleaf calls has a wider
>> effect.
>> 
>> It also appears to me that with Stuart’s new nmethod entry barriers
>> enabled, ISB is never required on returns, as oop are no longer
>> embedded in the instruction stream then (which is what the ISB
>> protects against).
> 
> That's probably true. In order to get it right for sure we'd need to
> insert a bunch of assertions in debug mode. I'll have a look.
> 
> A (fairly) recent change to the ARM ARM (DDI 0487E, B2.3.5, Ordering
> of instruction fetches, first para.) means that we no longer have to
> be quite so paranoid about issuing ISBs. When call_VM was written the
> specification of what might happen was so loose that it was almost
> impossible to comply with.
> 
> -- 
> Andrew Haley  (he/him)
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> https://keybase.io/andrewhaley
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
> 




More information about the hotspot-gc-dev mailing list