RFR: 8220343: Move scavenge_root_nmethods from shared code

Stefan Karlsson stefan.karlsson at oracle.com
Thu Mar 14 10:36:37 UTC 2019


New webrevs:
  http://cr.openjdk.java.net/~stefank/8220343/webrev.04.delta
  http://cr.openjdk.java.net/~stefank/8220343/webrev.04

The call to prune the scavengable nmethods were inadvertently moved to 
the old location of CodeCache::gc_prolog call, but should have been 
moved to the old location of the CodeCache::gc_epilogue call. This does 
not affect the functionality, but delays the pruning until next full or 
young GC.

StefanK

On 2019-03-11 15:23, Stefan Karlsson wrote:
> Hi all,
> 
> Please review this patch to move the scavenge root code out from 
> CodeCache and nmethod.
> 
> http://cr.openjdk.java.net/~stefank/8220343/webrev.01/
> https://bugs.openjdk.java.net/browse/JDK-8220343
> 
> The CodeCache::scavenge_root_nmethods_do function and its implementation 
> in CodeCache and nmethod, is only used by set of our GCs (Serial, 
> Parallel, and CMS), but not by G1, ZGC, Shenandoah, or Epsilon. I want 
> to move all of that into GC subsystem and then only let those GCs using 
> it pay the cost of having that code.
> 
> This is a continuation of the work of the GC Interface, where G1, ZGC, 
> Shenandoah, and Epsilon, uses the register_nmethod, unregister_nmethod, 
> and flush_nmethod calls, but the other GCs don't.
> 
> This patch builds upon:
>   JDK-8220411: Remove ScavengeRootsInCode=0 code
>   https://bugs.openjdk.java.net/browse/JDK-8220411
> 
> and also depends on the the resolution of:
>   JDK-8220342: Remove scavenge_root_nmethods_do from 
> VM_HeapWalkOperation::collect_simple_roots
>   https://bugs.openjdk.java.net/browse/JDK-8220342
> 
> Thanks,
> StefanK


More information about the hotspot-gc-dev mailing list