RFR: 8256106: Bypass intrinsic/barrier when calling Reference.get() from Finalizer [v3]
eosterlund at openjdk.java.net
Wed Nov 11 18:07:02 UTC 2020
On Wed, 11 Nov 2020 17:48:12 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> Finalizer calls Reference.get() from the Finalizer to acquire the finalizee. Concurrent reference processing GCs like Shenandoah and ZGC would return NULL for unreachable referents, and thus would not call finalize() on them.
>> ZGC works around this by fixing the referent before enqueuing, so that the barrier would take the fast-path, but Shenandoah cannot do this.
>> It is ok to bypass the barrier altogether in this place, because the FinalReference is inactive and marking and reference-discovery treat inactive FinalReferences like strong references.
>> - [x] hotspot_gc_shenandoah
>> - [x] tier1 +UseShenandoahGC +ShenandoahVerify
>> - [x] tier2 +UseShenandoahGC +ShenandoahVerify
>> - [x] tier1
>> - [x] tier2
> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
> Rename inactive-getter and improve javadocs
Marked as reviewed by eosterlund (Reviewer).
More information about the hotspot-gc-dev