--- old/src/hotspot/share/gc/parallel/psMarkSweep.cpp 2019-03-11 22:56:19.782661481 +0100 +++ new/src/hotspot/share/gc/parallel/psMarkSweep.cpp 2019-03-11 22:56:19.182651752 +0100 @@ -187,7 +187,6 @@ // Let the size policy know we're starting size_policy->major_collection_begin(); - CodeCache::gc_prologue(); BiasedLocking::preserve_marks(); // Capture metadata size before collection for sizing. @@ -255,7 +254,7 @@ MetaspaceUtils::verify_metrics(); BiasedLocking::restore_marks(); - CodeCache::gc_epilogue(); + heap->prune_nmethods(); JvmtiExport::gc_epilogue(); #if COMPILER2_OR_JVMCI @@ -525,7 +524,7 @@ SystemDictionary::oops_do(mark_and_push_closure()); ClassLoaderDataGraph::always_strong_cld_do(follow_cld_closure()); // Do not treat nmethods as strong roots for mark/sweep, since we can unload them. - //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(mark_and_push_closure())); + //ScavengableNMethods::scavengable_nmethods_do(CodeBlobToOopClosure(mark_and_push_closure())); AOTLoader::oops_do(mark_and_push_closure()); }