RFR (M): 8159984: Remove call to ClassLoaderDataGraph::clear_claimed_marks during the initial mark pause

Kim Barrett kim.barrett at oracle.com
Wed Sep 18 18:36:58 UTC 2019

> On Sep 18, 2019, at 11:22 AM, Thomas Schatzl <thomas.schatzl at oracle.com> wrote:
> Hi all,
>  can I have reviews for this change that, given the observation that during root processing, there is only one kind of root that walks CLDs, we do not need to
> a) claim CLDs during iteration, obsoleting the need to clear the CLD claims
> a) wait for "strong" CLD iteration before we can continue with evacuating the heap
> any more (during the concurrent start pause).
> We *still* need to wait for "strong" iteration of oops from nmethods as later during the evacuation phase we use the per-region nmethod remembered sets. We need to make sure that all "strong" nmethod iteration is finished at that time.
> There is the possibility to change the "strong" nmethod iteration to mark their oops outside the iteration claim, then the wait barrier is unnecessary. This is a separate issue though.
> Thanks go to StefanK for explaining me the root processing issue over and over again until I finally got it.
> This change obsoletes JDK-8163213 and JDK-8231073.
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8159984
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8159984/webrev/
> Testing:
> hs-tier1-5
> (based on JDK-8231117)
> Thanks,
>  Thomas

I was just looking at the root scanning code recently, trying to
figure out what worker_has_discovered_all_strong_classes() was about.

The naming of worker_has_discovered_all_strong_classes() and
wait_until_all_strong_classes_discovered() seems wrong now.  These are
about discovering/processing strong nmethods now.

A better comment at the call to the wait function about why it's
called there would be helpful.  Obviously we want it as late as
possible, to allow threads to get past the notification.  But why not
later?  (We talked about this off-line; this is just a reminder and
request for some commentary capturing that discussion. Though
hopefully your idea for getting rid of the barrier completly will pan

Other than that, looks good.

More information about the hotspot-gc-dev mailing list