diff src/share/vm/gc_implementation/g1/sparsePRT.cpp @ 1708:a03ae377b2e8

6930581: G1: assert(ParallelGCThreads > 1 || n_yielded() == _hrrs->occupied(),"Should have yielded all the .. Summary: During RSet updating, when ParallelGCThreads is zero, references that point into the collection set are added directly the referenced region's RSet. This can cause the sparse table in the RSet to expand. RSet scanning and the "occupied" routine will then operate on different instances of the sparse table causing the assert to trip. This may also cause some cards added post expansion to be missed during RSet scanning. When ParallelGCThreads is non-zero such references are recorded on the "references to be scanned" queue and the card containing the reference is recorded in a dirty card queue for use in the event of an evacuation failure. Employ the parallel code in the serial case to avoid expanding the RSets of regions in the collection set. Reviewed-by: iveresov, ysr, tonyp
author johnc
date Fri, 06 Aug 2010 10:17:21 -0700
parents c18cbe5936b8
children 9f4848ebbabd
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/sparsePRT.cpp	Wed Aug 04 13:03:23 2010 -0400
+++ b/src/share/vm/gc_implementation/g1/sparsePRT.cpp	Fri Aug 06 10:17:21 2010 -0700
@@ -424,7 +424,7 @@
 
 
 SparsePRT::SparsePRT(HeapRegion* hr) :
-  _expanded(false), _next_expanded(NULL)
+  _hr(hr), _expanded(false), _next_expanded(NULL)
 {
   _cur = new RSHashTable(InitialCapacity);
   _next = _cur;