Shenandoah: SBSA::load_at() should save/restore registers when calling SATB barrier

Zhengyu Gu zgu at redhat.com
Mon Oct 7 00:36:11 UTC 2019



On 10/4/19 4:00 PM, Roman Kennke wrote:
>>> Is it ok for that particular piece of code to not push/pop rax and rbx?
>>
>> save_registers()/restore_registers() do not push/pop rax and rbx.
> 
> Yes, that's what I mean. Do you require this particular behaviour? If
> not, i.e. if you're good to simply push/pop all registers, then you can
> use push_CPU_state() and pop_CPU_state() instead.
> 
> The LRB stub doesn't push/pop rax because that's where the result comes
> back.

Right, we should save rax and rbx, as from c2i_entry_barrier, rbx has 
Method pointer, which needs to be preserved.

Webrev: 
http://cr.openjdk.java.net/~zgu/shenandoah/load_at_keepalive_fix/webrev.01/


>>>> This fix also fixes the intermittent is_loader_alive() assertion we have
>>>> seen in nightly tests. While this assertion is relative rare on x86_64,
>>>> but it is quite reproducible on x86_32 (because of it has less
>>>> registers(?)). With this fix, I have yet seen once.

Unfortunately, this assertion failure came back during stress runs (put 
tier3 tests in loop) over the weekend, sigh! But I think they are 
different issues and this change should stay.

Thanks,

-Zhengyu


>>>>
>>>>
>>>> Webrev:
>>>> http://cr.openjdk.java.net/~zgu/shenandoah/load_at_keepalive_fix/webrev.00/
>>>>
>>>>
>>>> Test:
>>>>     hotspot_gc_shenandoah (fastdebug and release) x86_64 and x86_32 on
>>>> Linux
>>>>
>>>> Thanks,
>>>>
>>>> -Zhengyu
>>>>
>>>
> 


More information about the shenandoah-dev mailing list