RFR: 8255070: Shenandoah: use single thread for concurrent CLD liveness test

Zhengyu Gu zgu at openjdk.java.net
Wed Oct 21 00:09:14 UTC 2020


On Wed, 21 Oct 2020 00:04:09 GMT, Azeem Jiva <azeemj at openjdk.org> wrote:

>> Since the concurrent liveness test does not touch any oops, there is no point to use multi-thread for the task, they
>> just duplicate the work.
>> Also, multi-thread version requires to acquire ClassLoaderGraph_lock early, which is deadlock prone.
>
> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 1944:
> 
>> 1942:
>> 1943:   // Roots related to concurrent class unloading
>> 1944:   ShenandoahClassLoaderDataRoots<true /* concurrent */, true /* single thread*/>
> 
> Should the first input be false?

No. It runs concurrently, so will need to acquire ClassLoaderGraph_lock.

-------------

PR: https://git.openjdk.java.net/jdk/pull/777



More information about the hotspot-gc-dev mailing list