RFR (M) 8203837: Split nmethod unloading from nmethod cache cleaning
tobias.hartmann at oracle.com
Fri Jun 1 08:04:54 UTC 2018
this looks good to me but someone from GC should have a look as well.
On 30.05.2018 14:23, coleen.phillimore at oracle.com wrote:
> Summary: Refactor cleaning inline caches to after GC do_unloading.
> See CR for more information. This patch refactors CompiledMethod::do_unloading() to unload nmethods
> in case of !is_alive oop. If the nmethod is not unloaded, cleans the inline caches, and exception
> cache, for unloaded classes and unloaded nmethods. The CodeCache walk in gc_epilogue is moved
> earlier to combine with cleanup for class unloading.
> It doesn't add CodeCache walks to any of the GCs, and keeps the G1 parallel nmethod unloading
> intact. This patch also uses common code for CompiledMethod::clean_inline_caches which was
> duplicated by the G1 functions.
> The patch also fixed a case in AOT where clear_inline_caches should be called instead of
> clean_inline_caches. I think neither is necessary for the nmethods that are deoptimized because of
> redefinition, but clear_inline_caches clears up redefined Methods* not for unloaded nmethods. Once
> the method is cleaned by the sweeper, clean_inline_caches will be called on it. clear vs. clean ...
> The patch also converts TraceScavenge to -Xlog:gc+nmethod=trace. I can revert this part and do it
> separately; I had just converted it while looking at the output.
> open webrev at http://cr.openjdk.java.net/~coleenp/8203837.01/webrev
> bug link https://bugs.openjdk.java.net/browse/JDK-8203837
> Tested with mach5 hs-tier1-5, the gc-test-suite (including specjbb2015, dacapo, gcbasher), runThese
> with all GCs with and without class unloading.
> This is an enhancement that we can use for making nmethod cleaning concurrent in ZGC.
More information about the hotspot-dev