diff src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 546:05c6d52fa7a9

6690928: Use spinning in combination with yields for workstealing termination. Summary: Substitute a spin loop for most calls to yield() to reduce the stress on the system. Reviewed-by: tonyp
author jmasa
date Sun, 08 Feb 2009 13:18:01 -0800
parents 58054a18d735
children 0fbdb4381b99 3698e8f47799 98cb887364d3
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Fri Feb 06 01:38:50 2009 +0300
+++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Sun Feb 08 13:18:01 2009 -0800
@@ -949,6 +949,10 @@
     GCOverheadReporter::recordSTWEnd(end);
     g1_policy()->record_full_collection_end();
 
+#ifdef TRACESPINNING
+    ParallelTaskTerminator::print_termination_counts();
+#endif
+
     gc_epilogue(true);
 
     // Abandon concurrent refinement.  This must happen last: in the
@@ -2647,8 +2651,13 @@
       }
     }
 
-    if (mark_in_progress())
+    if (mark_in_progress()) {
       concurrent_mark()->update_g1_committed();
+    }
+
+#ifdef TRACESPINNING
+    ParallelTaskTerminator::print_termination_counts();
+#endif
 
     gc_epilogue(false);
   }