Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp @ 4096:00dd86e542eb
7114303: G1: assert(_g1->mark_in_progress()) failed: shouldn't be here otherwise
Summary: Race between the VM thread reading G1CollectedHeap::_mark_in_progress and it being set by the concurrent mark thread when concurrent marking is aborted by a full GC. Have the concurrent mark thread join the SuspendibleThreadSet before changing the marking state.
Reviewed-by: tonyp, brutisso
author | johnc |
---|---|
date | Mon, 28 Nov 2011 09:49:05 -0800 |
parents | db89aa49298f |
children | d30fa85f9994 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp Tue Aug 09 10:16:01 2011 -0700 +++ b/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp Mon Nov 28 09:49:05 2011 -0800 @@ -191,7 +191,11 @@ VM_CGC_Operation op(&cl_cl, verbose_str); VMThread::execute(&op); } else { + // We don't want to update the marking status if a GC pause + // is already underway. + _sts.join(); g1h->set_marking_complete(); + _sts.leave(); } // Check if cleanup set the free_regions_coming flag. If it