hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
changeset 19341 17284e84baba
parent 19339 d247781beec7
child 19549 60e5c7cafdca
child 19546 f6b7c9e96ea3
--- 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 {