RFR: Traversal needs to enqueue evacuated oops in codecahe

Roman Kennke rkennke at redhat.com
Mon Aug 20 19:15:36 UTC 2018


Am 20.08.2018 um 17:59 schrieb Zhengyu Gu:
> 
> Webrev:
> http://cr.openjdk.java.net/~zgu/shenandoah/traversal_enqueue_codecache_oops/webrev.00/
> 
> 
> Test:
> 
>   tier3_gc_shenandoah (fastdebug and release) with
>   -XX:+UnlockExperimentalVMOptions
>   -XX:-UseDynamicNumberOfCompilerThreads
> 
> to avoid the noise from upstream bug [1]
> 
> [1] https://bugs.openjdk.java.net/browse/JDK-8209670
> 
> Thanks,

The patch is ok.

This probably warrants some explanation of why we think this is correct.

Usually, code roots are scanned and treated at pauses, e.g.
init-traversal or init-mark. During traversal, what happens is that all
oops found in code roots are 1. marked, 2. evacuated, 3. ref in code
root updated and 4. enqueued in task queue for further traversal. What
the nmethod-register stuff does is basically exactly this. Except that
for traversal, we missed step 4.

I believe we could now drop codecache scanning in final-traversal,
because handling them in init-traversal and subsequently for all new
nmethods should handle them all.

The alternative to this patch would be to fix scanning etc at
final-traversal time. This would probably leave fewer waste, but
prolongs the pause. I think what this patch does is better.

Roman


More information about the shenandoah-dev mailing list