RFR 8233500: Shenandoah: Shenandoah load barrier should save registers before calling keep alive barrier on x86

Zhengyu Gu zgu at redhat.com
Mon Nov 4 19:12:35 UTC 2019



On 11/4/19 1:59 PM, Roman Kennke wrote:
>>>>> SATB handling is similar to G1 is doing, where's the similar code in
>>>>> G1? The patch adds save/restore
>>>>> at in SBSA::load_at, but there is a similar block in SBSA::store_at,
>>>>> why it is not needed there?
>>>>
>>>> Because we do self-fixing in LRB and have to reshuffle registers.
>>>
>>> Okay. So AArch64 does enter()/leave(), why x86 needs the entire
>>> IU_state pushed/popped?
>> Roman suggested.
>>
>> Roman, could you answer?
> 
> enter()/leave() sets up/tears down the stub frame for the runtime call.

Ha, I misunderstood enter()/leave().

> push/pop_IU_state() saves/restores the registers. Aarch64 code also
> saves/restores the registers via push/pop_call_clobbered_registers().

I think we are still okay with AArch64, because unlike x86, it at most 
clobbers rscratch1.

-Zhengyu

> 
> Roman
> 
> 
>> Thanks,
>>
>> -Zhengyu
>>
>>>
>>> My concern is that pushing/popping the entire state explodes code size
>>> (we don't care about
>>> performance much, but we do care about hitting the stub boundaries),
>>> and probably hides some bugs
>>> with register shuffles.
>>>
> 



More information about the hotspot-gc-dev mailing list