RFR: Fix weakref precleaning
Aleksey Shipilev
shade at redhat.com
Wed May 31 18:05:38 UTC 2017
On 05/31/2017 07:59 PM, Roman Kennke wrote:
> Weakref precleaning does infact need to do something in the
> keepalive-closure:
>
> - It must update internal refs in j.l.r.Reference instances. I.e. make
> referent point to to-space
> - It must mark through the next field for references that are enqueued
>
> And therefore the complete_gc closure also needs to process stuff on the
> marking stack.
>
> The patch fixes those issues plus also drains SATB buffers, and adds a
> ResourceMark for -Xlog:gc+ref logging.
>
> http://cr.openjdk.java.net/~rkennke/fixpreclean/webrev.00/
Thanks for doing this.
Comments:
*) ShenandoahPrecleanKeepAliveUpdateClosure is not used. Seems like a bug! It
should be used on need_update_refs() path, right?
*) Can use ReferenceProcessorIsAliveMutator, because RP is not null there
*) Double ";"
819 ReferenceProcessor* rp = sh->ref_processor();;
*) Misleading comment:
825 true, // do not drain SATBs
*) Leftovers:
872 tty->print_cr("need update refs");
...
880 tty->print_cr("don't need update refs");
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list