comparison 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
comparison
equal deleted inserted replaced
545:58054a18d735 546:05c6d52fa7a9
946 } 946 }
947 947
948 double end = os::elapsedTime(); 948 double end = os::elapsedTime();
949 GCOverheadReporter::recordSTWEnd(end); 949 GCOverheadReporter::recordSTWEnd(end);
950 g1_policy()->record_full_collection_end(); 950 g1_policy()->record_full_collection_end();
951
952 #ifdef TRACESPINNING
953 ParallelTaskTerminator::print_termination_counts();
954 #endif
951 955
952 gc_epilogue(true); 956 gc_epilogue(true);
953 957
954 // Abandon concurrent refinement. This must happen last: in the 958 // Abandon concurrent refinement. This must happen last: in the
955 // dirty-card logging system, some cards may be dirty by weak-ref 959 // dirty-card logging system, some cards may be dirty by weak-ref
2645 size_t bytes_before = capacity(); 2649 size_t bytes_before = capacity();
2646 expand(expand_bytes); 2650 expand(expand_bytes);
2647 } 2651 }
2648 } 2652 }
2649 2653
2650 if (mark_in_progress()) 2654 if (mark_in_progress()) {
2651 concurrent_mark()->update_g1_committed(); 2655 concurrent_mark()->update_g1_committed();
2656 }
2657
2658 #ifdef TRACESPINNING
2659 ParallelTaskTerminator::print_termination_counts();
2660 #endif
2652 2661
2653 gc_epilogue(false); 2662 gc_epilogue(false);
2654 } 2663 }
2655 2664
2656 assert(verify_region_lists(), "Bad region lists."); 2665 assert(verify_region_lists(), "Bad region lists.");