[15] RFR 8228818: Shenandoah: Processing weak roots in concurrent phase when possible

Roman Kennke rkennke at redhat.com
Wed Jan 8 16:39:25 UTC 2020


Hi Zhengyu,

src/hotspot/share/gc/shenandoah/shenandoahClosures.hpp:
+class ShenandoahEvacUpdateCleanupOopStorageRootsClosure : public
BasicOopIterateClosure {

Why can't this go in shenandoahHeap.cpp (only place where it's used)?

src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp:
+  // Cleanup/Evacuate weak roots
+  if (heap->marking_context()->is_complete() &&
ShenandoahConcurrentRoots::should_do_concurrent_class_unloading()) {
+    heap->entry_weak_roots();

Are you sure that we only want to do cleanup when we do
conc-class-unloading? Originally, we hoooked this up in the
entry_roots(), why's that not good enough?

src/hotspot/share/gc/shenandoah/shenandoahRootVerifier.cpp:

What's that change?
-  return (_types & type) != 0;
+  return (_types & type) == type;

Thanks,
Roman

> Please review this enhancement that moves some of weak root processing
> into concurrent phase whenever possible.
> 
> When concurrent class unloading is enabled, the weak roots that backed
> by OopStorage can be processed in concurrent phase, as Shenandoah native
> LRB can properly resolve the object and hide dead oops from mutators.
> 
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8228818
> Webrev: http://cr.openjdk.java.net/~zgu/JDK-8228818/webrev.00/
> 
> Test:
>   hotspot_gc_shenandoah (fastdebug and release)
>   on x86_64 and x86_32 Linux
>   specjvm on x86_64 Linux
> 
> Thanks,
> 
> -Zhengyu
> 




More information about the hotspot-gc-dev mailing list