hotspot/src/share/vm/memory/collectorPolicy.cpp
changeset 15086 2bfd799e9147
parent 14583 d70ee55535f4
child 15091 826cff1f58f5
--- a/hotspot/src/share/vm/memory/collectorPolicy.cpp	Fri Dec 21 10:27:49 2012 -0800
+++ b/hotspot/src/share/vm/memory/collectorPolicy.cpp	Mon Dec 03 15:09:39 2012 -0800
@@ -777,6 +777,15 @@
                                        full_gc_count,
                                        GCCause::_metadata_GC_threshold);
     VMThread::execute(&op);
+
+    // If GC was locked out, try again.  Check
+    // before checking success because the prologue
+    // could have succeeded and the GC still have
+    // been locked out.
+    if (op.gc_locked()) {
+      continue;
+    }
+
     if (op.prologue_succeeded()) {
       return op.result();
     }