Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit de5208e

Browse files
committedMar 12, 2020
Merge
2 parents 0ed44d0 + 71e1277 commit de5208e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.inline.hpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ void ShenandoahRootScanner<ITR>::roots_do(uint worker_id, OopClosure* oops, CLDC
226226
!ShenandoahHeap::heap()->unload_classes() ||
227227
ShenandoahHeap::heap()->is_traversal_mode(),
228228
"Expect class unloading or traversal when Shenandoah cycle is running");
229-
ShenandoahParallelOopsDoThreadClosure tc_cl(oops, code, tc);
230229
ResourceMark rm;
231230

232231
_serial_roots.oops_do(oops, worker_id);
@@ -238,13 +237,16 @@ void ShenandoahRootScanner<ITR>::roots_do(uint worker_id, OopClosure* oops, CLDC
238237
assert(ShenandoahHeap::heap()->is_concurrent_traversal_in_progress(), "Only possible with traversal GC");
239238
}
240239

241-
_thread_roots.threads_do(&tc_cl, worker_id);
242-
243240
// With ShenandoahConcurrentScanCodeRoots, we avoid scanning the entire code cache here,
244241
// and instead do that in concurrent phase under the relevant lock. This saves init mark
245242
// pause time.
246243
if (code != NULL && !ShenandoahConcurrentScanCodeRoots) {
247244
_code_roots.code_blobs_do(code, worker_id);
245+
ShenandoahParallelOopsDoThreadClosure tc_cl(oops, NULL, tc);
246+
_thread_roots.threads_do(&tc_cl, worker_id);
247+
} else {
248+
ShenandoahParallelOopsDoThreadClosure tc_cl(oops, code, tc);
249+
_thread_roots.threads_do(&tc_cl, worker_id);
248250
}
249251

250252
AlwaysTrueClosure always_true;

0 commit comments

Comments
 (0)