8023145: G1: G1CollectedHeap::mark_strong_code_roots() needs to handle ParallelGCThreads=0

Reviewed-by: stefank, mgerdin
This commit is contained in:
Bengt Rutisson 2013-08-16 11:26:09 +02:00
parent befd51708b
commit 5e41090120

View File

@ -6807,10 +6807,14 @@ public:
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 {