CLDG and parallel GC support merge

Zhengyu Gu zgu at redhat.com
Wed Apr 26 12:06:51 UTC 2017



On 04/26/2017 07:37 AM, Aleksey Shipilev wrote:
> Hi, (Zhengyu?)
>
> We have the parallel CLDG iterators that use the parallel_cld_* methods:
>
> class ClassLoaderData {
>   ...
>
>   // GC interface.
>   void clear_claimed()          { _claimed = 0; }
>   bool claimed() const          { return _claimed == 1; }
>   bool claim();
>
>   // Parallel GC support
>   void clear_parallel_cld_claimed() { _parallel_cld_claimed = 0; }
>   bool parallel_cld_claimed() const { return _parallel_cld_claimed == 1; }
>   bool parallel_claim_cld();
>
>   ...
> }
>
> I have several questions:
>
>  a) Why not reuse the _claimed field? It is volatile, and it is also uses CAS
> updates. 8u has the same, so we don't need this for backports.
>
>  b) I see ParallelCLDRootIterator::init clearing parallel_cld_claimed. But we
> *also* have calls to ClassLoaderDataGraph::clear_claimed_marks() all around
> Shenandoah that clear _cld_claimed (and do that during the pause). This seems
> excessive? Should we consistently use/clean either one?

Yes, we should consolidate them into one. I wasn't sure about 
_cld_claimed flag at the time ...

Thanks,

-Zhengyu

>
> Thanks,
> -Aleksey
>


More information about the shenandoah-dev mailing list