8155966: Assertion failures when -XX:+UseParallelGC -XX:ParallelGCThreads=1
authorjmasa
Tue, 03 May 2016 16:19:42 -0700
changeset 38179 d2c90d6c5bf4
parent 38176 53ff0558fff2
child 38180 103a07898ed1
8155966: Assertion failures when -XX:+UseParallelGC -XX:ParallelGCThreads=1 Reviewed-by: drwhite, kbarrett
hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp
--- a/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp	Tue May 03 13:30:40 2016 -0700
+++ b/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp	Tue May 03 16:19:42 2016 -0700
@@ -1929,7 +1929,7 @@
     ParCompactionManager* const cm =
       ParCompactionManager::manager_array(int(i));
     assert(cm->marking_stack()->is_empty(),       "should be empty");
-    assert(cm->region_stack()->is_empty(), "should be empty");
+    assert(cm->region_stack()->is_empty(), "Region stack " SIZE_FORMAT " is not empty", i);
   }
 #endif // ASSERT
 
@@ -2370,10 +2370,8 @@
 
   // Once a thread has drained it's stack, it should try to steal regions from
   // other threads.
-  if (parallel_gc_threads > 1) {
-    for (uint j = 0; j < parallel_gc_threads; j++) {
-      q->enqueue(new StealRegionCompactionTask(terminator_ptr));
-    }
+  for (uint j = 0; j < parallel_gc_threads; j++) {
+    q->enqueue(new StealRegionCompactionTask(terminator_ptr));
   }
 }