--- old/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp 2020-05-26 14:38:26.138610819 -0400 +++ new/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp 2020-05-26 14:38:25.936609625 -0400 @@ -308,9 +308,7 @@ workers->run_task(&mark_roots); } - if (ShenandoahConcurrentScanCodeRoots) { - clear_claim_codecache(); - } + clear_claim_codecache(); } void ShenandoahConcurrentMark::update_roots(ShenandoahPhaseTimings::Phase root_phase) { @@ -392,7 +390,7 @@ } void ShenandoahConcurrentMark::concurrent_scan_code_roots(uint worker_id, ReferenceProcessor* rp) { - if (ShenandoahConcurrentScanCodeRoots && claim_codecache()) { + if (claim_codecache()) { ShenandoahObjToScanQueue* q = task_queues()->queue(worker_id); if (!_heap->unload_classes()) { MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); @@ -943,11 +941,9 @@ } bool ShenandoahConcurrentMark::claim_codecache() { - assert(ShenandoahConcurrentScanCodeRoots, "must not be called otherwise"); return _claimed_codecache.try_set(); } void ShenandoahConcurrentMark::clear_claim_codecache() { - assert(ShenandoahConcurrentScanCodeRoots, "must not be called otherwise"); _claimed_codecache.unset(); } --- old/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.inline.hpp 2020-05-26 14:38:27.255617424 -0400 +++ new/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.inline.hpp 2020-05-26 14:38:27.058616259 -0400 @@ -235,17 +235,8 @@ assert(clds != NULL, "Only possible with CLD closure"); _cld_roots.cld_do(clds, worker_id); - // With ShenandoahConcurrentScanCodeRoots, we avoid scanning the entire code cache here, - // and instead do that in concurrent phase under the relevant lock. This saves init mark - // pause time. - if (code != NULL && !ShenandoahConcurrentScanCodeRoots) { - _code_roots.code_blobs_do(code, worker_id); - ShenandoahParallelOopsDoThreadClosure tc_cl(oops, NULL, tc); - _thread_roots.threads_do(&tc_cl, worker_id); - } else { - ShenandoahParallelOopsDoThreadClosure tc_cl(oops, code, tc); - _thread_roots.threads_do(&tc_cl, worker_id); - } + ShenandoahParallelOopsDoThreadClosure tc_cl(oops, code, tc); + _thread_roots.threads_do(&tc_cl, worker_id); AlwaysTrueClosure always_true; _dedup_roots.oops_do(&always_true, oops, worker_id); --- old/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp 2020-05-26 14:38:28.406624230 -0400 +++ new/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp 2020-05-26 14:38:28.205623041 -0400 @@ -345,9 +345,6 @@ diagnostic(bool, ShenandoahLoadRefBarrier, true, \ "Turn on/off load-reference barriers in Shenandoah") \ \ - diagnostic(bool, ShenandoahConcurrentScanCodeRoots, true, \ - "Scan code roots concurrently, instead of during a pause") \ - \ diagnostic(uintx, ShenandoahCodeRootsStyle, 2, \ "Use this style to scan the code cache roots:" \ " 0 - sequential iterator;" \