RFR: Strong roots scan should include thread stack oops

Roman Kennke rkennke at redhat.com
Thu Jul 6 10:01:08 UTC 2017


Am 06.07.2017 um 11:42 schrieb Aleksey Shipilev:
> We call into RP::process_strong_roots during init mark here:
>
>     if (heap->concurrentMark()->unload_classes()) {
>       _rp->process_strong_roots(&mark_cl, _process_refs ? NULL : &mark_cl,
>                                 &cldCl, &blobsCl, worker_id);
>
> ...with the rationale:
>
>  a. With unload_classes = true, we only want to scan the actual strong roots
>     from the code cache. This will allow us to identify the dead classes,
>     unload them, *and* invalidate the relevant code cache blobs. This could
>     be only done together with class unloading.
>
> However, inside process_strong_roots definition, we ignore CodeBlobClosure!
> Instead, we should pass it down to process_java_roots, which will pass it to
> stack code oop scans, which are by definition, strong. Makes sense?
>
> Fix:
>   http://cr.openjdk.java.net/~shade/shenandoah/rs-strong-coderoots/webrev.01/
>
> Testing: hotspot_gc_shenandoah
>
> Thanks,
> -Aleksey
>
Eh. WTF?

Yes, please push.

I'd really like to know how that happened and how could this possibly
work at all? How did we not unload most of the code cache?!

Roman



More information about the shenandoah-dev mailing list