Redundant dereferences in C2 shenandoah_wb?

Roman Kennke rkennke at redhat.com
Wed Sep 7 10:10:09 UTC 2016


The first is only there to trigger a SIGSEGV/NPE on null. The 2nd absolutely needs to come after the check for evacuation in progress to avoid a load load race at the end of evacuation. I don't think it affects performance much. If you have a solution to trigger NPE correctly on the 2nd instruction and not only the first (e.g. improve the signal handling), that would be very welcome!

Cheers, RomanAm 07.09.2016 12:01 nachm. schrieb Aleksey Shipilev <ashipile at redhat.com>:
>
> Hi, 
>
> I am studying the generated code for Shenandoah barriers. These two 
> dereferences seem excessive: 
>   http://cr.openjdk.java.net/~shade/shenandoah/wb.deref.1/webrev.00/ 
>
> C1 and interpreter code for both x86_64 and AArch64 do not seem to do 
> the additional read barrier before testing evacuation_in_progress, doing 
> that only after. Am I missing something? 
>
> Thanks, 
> -Aleksey 


More information about the shenandoah-dev mailing list