CLDG and parallel GC support merge

Aleksey Shipilev shade at redhat.com
Wed Apr 26 11:37:28 UTC 2017


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?

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list