RFR: 8255691: Shenandoah: Invoke native-LRB only on non-strong refs [v3]
Zhengyu Gu
zgu at openjdk.java.net
Mon Nov 2 13:48:02 UTC 2020
On Fri, 30 Oct 2020 19:39:07 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> The way that current native LRB is implemented is wrong (but non-fatal) and misleading. It's purpose is to prevent resurrection of unreachable non-strong references, and it should only be invoked on non-strong references, not all native references. This distinction will become even more important once we get concurrent reference processing: then we also want to invoke this barrier on referent-loads.
>>
>> This changes the runtime-part of native-LRB so that it is only invoked when it's invoked with non-strong reference decorator. Otherwise it acts as regular LRB.
>>
>> Testing: hotspot_gc_shenandoah
>
> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>
> Rename LRB-native -> LRB-weak
Marked as reviewed by zgu (Reviewer).
src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp line 974:
> 972: CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier);
> 973:
> 974: address calladdr = is_native ? CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak)
Please rename is_native -> is_weak.
-------------
PR: https://git.openjdk.java.net/jdk/pull/961
More information about the shenandoah-dev
mailing list