# HG changeset patch # User brutisso # Date 1376645169 -7200 # Node ID 17284e84bababd46e17bee4f337a18047250bcdc # Parent f62b3c74b50f28409a9c370a93beb57782766da7 8023145: G1: G1CollectedHeap::mark_strong_code_roots() needs to handle ParallelGCThreads=0 Reviewed-by: stefank, mgerdin diff -r f62b3c74b50f -r 17284e84baba hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Thu Aug 15 13:02:42 2013 -0700 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Aug 16 11:26:09 2013 +0200 @@ -6807,10 +6807,14 @@ void G1CollectedHeap::mark_strong_code_roots(uint worker_id) { MarkStrongCodeRootsHRClosure cl(this, worker_id); - heap_region_par_iterate_chunked(&cl, - worker_id, - workers()->active_workers(), - HeapRegion::ParMarkRootClaimValue); + if (G1CollectedHeap::use_parallel_gc_threads()) { + heap_region_par_iterate_chunked(&cl, + worker_id, + workers()->active_workers(), + HeapRegion::ParMarkRootClaimValue); + } else { + heap_region_iterate(&cl); + } } class RebuildStrongCodeRootClosure: public CodeBlobClosure {