[15] RFR 8228818: Shenandoah: Processing weak roots in concurrent phase when possible
Zhengyu Gu
zgu at redhat.com
Wed Jan 8 17:21:08 UTC 2020
On 1/8/20 11:39 AM, Roman Kennke wrote:
> 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)?
Sure, updated: http://cr.openjdk.java.net/~zgu/JDK-8228818/webrev.01/
>
> 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?
Yes, otherwise, weak roots are still processed at final mark/init evac
pause.
I split into 2 phases, because I think it is logically simpler: when
weak roots processing failed, degenerated GC simply re-executes related
logic (parallel cleaning) and disarm nmethods, which is equivalent to
STW version.
>
> src/hotspot/share/gc/shenandoah/shenandoahRootVerifier.cpp:
>
> What's that change?
> - return (_types & type) != 0;
> + return (_types & type) == type;
>
Because WeakRoots is the combination of SerialWeakRoots and
ConcurrentWeakRoots now, when we test WeakRoots, expect both bits are set.
Thanks,
-Zhengyu
> 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 shenandoah-dev
mailing list