--- 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 {