Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp @ 5963:64bf7c8270cb
7147724: G1: hang in SurrogateLockerThread::manipulatePLL
Summary: Attempting to initiate a marking cycle when allocating a humongous object can, if a marking cycle is successfully initiated by another thread, result in the allocating thread spinning until the marking cycle is complete. Eliminate a deadlock between the main ConcurrentMarkThread, the SurrogateLocker thread, the VM thread, and a mutator thread waiting on the SecondaryFreeList_lock (while free regions are going to become available) by not manipulating the pending list lock during the prologue and epilogue of the cleanup pause.
Reviewed-by: brutisso, jcoomes, tonyp
author | johnc |
---|---|
date | Mon, 12 Mar 2012 14:59:00 -0700 |
parents | eff609af17d7 |
children | 5c86f8211d1e |
comparison
equal
deleted
inserted
replaced
5962:8a729074feae | 5963:64bf7c8270cb |
---|---|
153 mark_end_sec - mark_start_sec); | 153 mark_end_sec - mark_start_sec); |
154 } | 154 } |
155 | 155 |
156 CMCheckpointRootsFinalClosure final_cl(_cm); | 156 CMCheckpointRootsFinalClosure final_cl(_cm); |
157 sprintf(verbose_str, "GC remark"); | 157 sprintf(verbose_str, "GC remark"); |
158 VM_CGC_Operation op(&final_cl, verbose_str); | 158 VM_CGC_Operation op(&final_cl, verbose_str, true /* needs_pll */); |
159 VMThread::execute(&op); | 159 VMThread::execute(&op); |
160 } | 160 } |
161 if (cm()->restart_for_overflow() && | 161 if (cm()->restart_for_overflow() && |
162 G1TraceMarkStackOverflow) { | 162 G1TraceMarkStackOverflow) { |
163 gclog_or_tty->print_cr("Restarting conc marking because of MS overflow " | 163 gclog_or_tty->print_cr("Restarting conc marking because of MS overflow " |
187 os::sleep(current_thread, sleep_time_ms, false); | 187 os::sleep(current_thread, sleep_time_ms, false); |
188 } | 188 } |
189 | 189 |
190 CMCleanUp cl_cl(_cm); | 190 CMCleanUp cl_cl(_cm); |
191 sprintf(verbose_str, "GC cleanup"); | 191 sprintf(verbose_str, "GC cleanup"); |
192 VM_CGC_Operation op(&cl_cl, verbose_str); | 192 VM_CGC_Operation op(&cl_cl, verbose_str, false /* needs_pll */); |
193 VMThread::execute(&op); | 193 VMThread::execute(&op); |
194 } else { | 194 } else { |
195 // We don't want to update the marking status if a GC pause | 195 // We don't want to update the marking status if a GC pause |
196 // is already underway. | 196 // is already underway. |
197 _sts.join(); | 197 _sts.join(); |