RFR: 8255691: Shenandoah: Invoke native-LRB only on non-strong refs [v3]
Aleksey Shipilev
shade at openjdk.java.net
Mon Nov 2 14:16:16 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
Generally looks good, some minor nits.
src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp line 1063:
> 1061: Node* in2 = n->in(2);
> 1062:
> 1063: // If one input is NULL, then step over the barriers (except LRB native) on the other input
Should be `weak LRB`, not `LRB native` now? Probably text search for `native` elsewhere?
src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp line 98:
> 96: }
> 97:
> 98: return ((decorators & IN_NATIVE) != 0) && ((decorators & ON_STRONG_OOP_REF) == 0);
This would change with conc ref processing, right? Currently this only accepts "native" + "weak" LRBs.
src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp line 105:
> 103: inline oop ShenandoahBarrierSet::load_reference_barrier(oop obj, T* load_addr) {
> 104:
> 105: // Prevent resurrection of unreachable non-strorg references.
Typo: "non-strorg"
-------------
Changes requested by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/961
More information about the shenandoah-dev
mailing list