RFR: Fix weakref precleaning
Roman Kennke
rkennke at redhat.com
Wed May 31 19:02:10 UTC 2017
Am 31.05.2017 um 20:05 schrieb Aleksey Shipilev:
> 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");
>
Oops. Shouldn't do stuff in a rush.
http://cr.openjdk.java.net/~rkennke/fixpreclean/webrev.01/
<http://cr.openjdk.java.net/%7Erkennke/fixpreclean/webrev.01/>
Ok now?
Roman
More information about the shenandoah-dev
mailing list