Re: RFR: 8256106: Bypass intrinsic/barrier when calling Reference.get() from Finalizer [v3]

2020-11-11 Thread Roman Kennke
On Wed, 11 Nov 2020 18:13:30 GMT, Albert Mingkun Yang wrote: > With `getInactive`, is the null check, `if (finalizee != null` still needed? Good point! I don't think it is. The GC should not clean the referent before we finalized it (or not at all), and no other code is clearing it either.

Re: RFR: 8256106: Bypass intrinsic/barrier when calling Reference.get() from Finalizer [v3]

2020-11-11 Thread Roman Kennke
On Wed, 11 Nov 2020 18:19:01 GMT, Mandy Chung wrote: >> Roman Kennke has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rename inactive-getter and improve javadocs > > src/java.base/share/classes/java/lang/ref/Reference.java line 356: >

Re: RFR: 8256106: Bypass intrinsic/barrier when calling Reference.get() from Finalizer [v3]

2020-11-11 Thread Mandy Chung
On Wed, 11 Nov 2020 17:48:12 GMT, Roman Kennke 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. >>

Re: RFR: 8256106: Bypass intrinsic/barrier when calling Reference.get() from Finalizer [v3]

2020-11-11 Thread Albert Mingkun Yang
On Wed, 11 Nov 2020 18:04:12 GMT, Erik Ă–sterlund wrote: >> Roman Kennke has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rename inactive-getter and improve javadocs > > Looks good. With `getInactive`, is the null check, `if (finalizee

Re: RFR: 8256106: Bypass intrinsic/barrier when calling Reference.get() from Finalizer [v3]

2020-11-11 Thread Erik Ă–sterlund
On Wed, 11 Nov 2020 17:48:12 GMT, Roman Kennke 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. >>

Re: RFR: 8256106: Bypass intrinsic/barrier when calling Reference.get() from Finalizer [v3]

2020-11-11 Thread Roman Kennke
> 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