Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
4095:bca17e38de00 | 4096:00dd86e542eb |
---|---|
189 CMCleanUp cl_cl(_cm); | 189 CMCleanUp cl_cl(_cm); |
190 sprintf(verbose_str, "GC cleanup"); | 190 sprintf(verbose_str, "GC cleanup"); |
191 VM_CGC_Operation op(&cl_cl, verbose_str); | 191 VM_CGC_Operation op(&cl_cl, verbose_str); |
192 VMThread::execute(&op); | 192 VMThread::execute(&op); |
193 } else { | 193 } else { |
194 // We don't want to update the marking status if a GC pause | |
195 // is already underway. | |
196 _sts.join(); | |
194 g1h->set_marking_complete(); | 197 g1h->set_marking_complete(); |
198 _sts.leave(); | |
195 } | 199 } |
196 | 200 |
197 // Check if cleanup set the free_regions_coming flag. If it | 201 // Check if cleanup set the free_regions_coming flag. If it |
198 // hasn't, we can just skip the next step. | 202 // hasn't, we can just skip the next step. |
199 if (g1h->free_regions_coming()) { | 203 if (g1h->free_regions_coming()) { |