diff src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp @ 795:215f81b4d9b3

6841831: G1: assert(contains_reference(from),"We just added it!") fires Summary: During parallel rset updating we have to make sure that the worker ids of the refinement threads do not intersect with the worker ids that can be claimed by the mutator threads. Reviewed-by: tonyp
author iveresov
date Mon, 18 May 2009 11:52:46 -0700
parents 315a5d70b295
children bd02caa94611 27f6a9b9c311
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp	Mon May 11 16:30:56 2009 -0700
+++ b/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp	Mon May 18 11:52:46 2009 -0700
@@ -30,8 +30,10 @@
 // The CM thread is created when the G1 garbage collector is used
 
 ConcurrentG1RefineThread::
-ConcurrentG1RefineThread(ConcurrentG1Refine* cg1r, ConcurrentG1RefineThread *next, int worker_id) :
+ConcurrentG1RefineThread(ConcurrentG1Refine* cg1r, ConcurrentG1RefineThread *next,
+                         int worker_id_offset, int worker_id) :
   ConcurrentGCThread(),
+  _worker_id_offset(worker_id_offset),
   _worker_id(worker_id),
   _active(false),
   _next(next),
@@ -114,7 +116,7 @@
     } else {
       lower_limit = DCQBarrierProcessCompletedThreshold / 4; // For now.
     }
-    while (dcqs.apply_closure_to_completed_buffer(_worker_id, lower_limit)) {
+    while (dcqs.apply_closure_to_completed_buffer(_worker_id + _worker_id_offset, lower_limit)) {
       double end_vtime_sec;
       double elapsed_vtime_sec;
       int elapsed_vtime_ms;