# HG changeset patch # User shade # Date 1568917613 -7200 # Node ID 89033e6641ed4866c0a97e34005ea47f131175dd # Parent de9d23469c68969ad6aa26bce3d72c2e672193bc 8231244: Shenandoah: all-roots heap walking misses some weak roots Reviewed-by: zgu, rkennke diff -r de9d23469c68 -r 89033e6641ed src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp --- a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp Thu Sep 19 20:26:52 2019 +0200 +++ b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp Thu Sep 19 20:26:53 2019 +0200 @@ -223,6 +223,7 @@ CLDToOopClosure clds(oops, ClassLoaderData::_claim_none); MarkingCodeBlobClosure code(oops, !CodeBlobToOopClosure::FixRelocations); ShenandoahParallelOopsDoThreadClosure tc_cl(oops, &code, NULL); + AlwaysTrueClosure always_true; ResourceMark rm; _serial_roots.oops_do(oops, 0); @@ -230,6 +231,10 @@ _cld_roots.cld_do(&clds, 0); _thread_roots.threads_do(&tc_cl, 0); _code_roots.code_blobs_do(&code, 0); + + _serial_weak_roots.weak_oops_do(oops, 0); + _weak_roots.oops_do(oops, 0); + _dedup_roots.oops_do(&always_true, oops, 0); } void ShenandoahHeapIterationRootScanner::strong_roots_do(OopClosure* oops) { diff -r de9d23469c68 -r 89033e6641ed src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp --- a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp Thu Sep 19 20:26:52 2019 +0200 +++ b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp Thu Sep 19 20:26:53 2019 +0200 @@ -254,6 +254,9 @@ ShenandoahVMRoots _vm_roots; ShenandoahClassLoaderDataRoots _cld_roots; + ShenandoahSerialWeakRoots _serial_weak_roots; + ShenandoahWeakRoots _weak_roots; + ShenandoahStringDedupRoots _dedup_roots; ShenandoahCodeCacheRoots _code_roots; public: