Potential ShTraversalGC::weak_refs_work_doit bug

Roman Kennke rkennke at redhat.com
Mon Sep 10 10:50:32 UTC 2018


Am 10.09.2018 um 11:46 schrieb Aleksey Shipilev:
> On 09/10/2018 11:38 AM, Roman Kennke wrote:
>>> This block has some weirdness:
>>>
>>> http://hg.openjdk.java.net/shenandoah/jdk/file/e60d7f4b3ba9/src/hotspot/share/gc/shenandoah/shenandoahTraversalGC.cpp#l1164
>>>
>>> *) is_alive is redefined -- to the same value?
>>
>> Where do you see is_alive redefined? It is defined once here:
>> http://hg.openjdk.java.net/shenandoah/jdk/file/e60d7f4b3ba9/src/hotspot/share/gc/shenandoah/shenandoahTraversalGC.cpp#l1172
>>
>>
>>> *) complete_gc is not used? Shouldn't we call it to pick up new stuff from weak_oops_do?
>>
>> It is used in WeakProcessor::weak_oops_do() calls, isn't it?
>>
>> Or maybe I misunderstand your questions?
> 
> It really helps to use the proper IDE that highlights those things ;)
>   http://cr.openjdk.java.net/~shade/shenandoah/clion-traversal-rp.png
> 
> -Aleksey
> 
> 

Oook.

So yeah, we only need 1 of the is_alive.

I am not sure about complete_gc. The interfaces in WeakProcessor don't
seem to require it, so either this is really not needed, or the
complete-closure is expected to be piggy-backed on keep_alive, or the GC
is expected to run an extra complete-gc phase afterwards. We should
figure that out. Also, we really should switch to use parallel
WeakProcessor.

Roman



More information about the shenandoah-dev mailing list