changeset 2219:04d1138b4cce

7023747: G1: too strict assert in RefineRecordRefsIntoCSCardTableEntryClosure::do_card_ptr in g1RemSet.cpp Summary: Made sure that the assert looks at ParallelGCThreads. Reviewed-by: stefank, tonyp, jwilhelm, johnc
author brutisso
date Thu, 03 Mar 2011 11:35:50 +0100
parents c93aa6caa02f
children a181f3a124dd 1fb790245268
files src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp src/share/vm/gc_implementation/g1/g1RemSet.cpp
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp	Thu Mar 03 22:58:46 2011 +0100
+++ b/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp	Thu Mar 03 11:35:50 2011 +0100
@@ -373,7 +373,7 @@
             // RSet updating while within an evacuation pause.
             // In this case worker_i should be the id of a GC worker thread
             assert(SafepointSynchronize::is_at_safepoint(), "not during an evacuation pause");
-            assert(worker_i < (int) DirtyCardQueueSet::num_par_ids(), "incorrect worker id");
+            assert(worker_i < (int) (ParallelGCThreads == 0 ? 1 : ParallelGCThreads), "incorrect worker id");
             into_cset_dcq->enqueue(entry);
           }
         }
--- a/src/share/vm/gc_implementation/g1/g1RemSet.cpp	Thu Mar 03 22:58:46 2011 +0100
+++ b/src/share/vm/gc_implementation/g1/g1RemSet.cpp	Thu Mar 03 11:35:50 2011 +0100
@@ -307,7 +307,7 @@
     // is during RSet updating within an evacuation pause.
     // In this case worker_i should be the id of a GC worker thread.
     assert(SafepointSynchronize::is_at_safepoint(), "not during an evacuation pause");
-    assert(worker_i < (int) DirtyCardQueueSet::num_par_ids(), "should be a GC worker");
+    assert(worker_i < (int) (ParallelGCThreads == 0 ? 1 : ParallelGCThreads), "should be a GC worker");
 
     if (_g1rs->concurrentRefineOneCard(card_ptr, worker_i, true)) {
       // 'card_ptr' contains references that point into the collection