comparison src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp @ 2030:fb712ff22571

7000559: G1: assertion failure !outer || (full_collections_started == _full_collections_completed + 1) Summary: The concurrent marking thread can complete its operation and increment the full GC counter during a Full GC. This causes the nesting of increments to the start and end of Full GCs that we are expecting to be wrong. the fix is for the marking thread to join the suspendible thread set before incrementing the counter so that it's blocked until the Full GC (or any other safepoint) is finished. The change also includes some minor code cleanup (I renamed a parameter). Reviewed-by: brutisso, ysr
author tonyp
date Tue, 14 Dec 2010 16:19:44 -0500
parents f95d63e2154a
children 0fa27f37d4d4
comparison
equal deleted inserted replaced
1996:f0ef5f5a460f 2030:fb712ff22571
275 275
276 // Update the number of full collections that have been 276 // Update the number of full collections that have been
277 // completed. This will also notify the FullGCCount_lock in case a 277 // completed. This will also notify the FullGCCount_lock in case a
278 // Java thread is waiting for a full GC to happen (e.g., it 278 // Java thread is waiting for a full GC to happen (e.g., it
279 // called System.gc() with +ExplicitGCInvokesConcurrent). 279 // called System.gc() with +ExplicitGCInvokesConcurrent).
280 g1->increment_full_collections_completed(true /* outer */); 280 _sts.join();
281 g1->increment_full_collections_completed(true /* concurrent */);
282 _sts.leave();
281 } 283 }
282 assert(_should_terminate, "just checking"); 284 assert(_should_terminate, "just checking");
283 285
284 terminate(); 286 terminate();
285 } 287 }