comparison src/share/vm/memory/collectorPolicy.cpp @ 1994:6cd6d394f280

7001033: assert(gch->gc_cause() == GCCause::_scavenge_alot || !gch->incremental_collection_failed()) 7002546: regression on SpecJbb2005 on 7b118 comparing to 7b117 on small heaps Summary: Relaxed assertion checking related to incremental_collection_failed flag to allow for ExplicitGCInvokesConcurrent behaviour where we do not want a failing scavenge to bail to a stop-world collection. Parameterized incremental_collection_will_fail() so we can selectively use, or not use, as appropriate, the statistical prediction at specific use sites. This essentially reverts the scavenge bail-out logic to what it was prior to some recent changes that had inadvertently started using the statistical prediction which can be noisy in the presence of bursty loads. Added some associated verbose non-product debugging messages. Reviewed-by: johnc, tonyp
author ysr
date Tue, 07 Dec 2010 21:55:53 -0800
parents f95d63e2154a
children dde920245681
comparison
equal deleted inserted replaced
1993:459fad165e5e 1994:6cd6d394f280
683 // to expand the heap, if there's room for expansion. 683 // to expand the heap, if there's room for expansion.
684 if (!gch->is_maximal_no_gc()) { 684 if (!gch->is_maximal_no_gc()) {
685 result = expand_heap_and_allocate(size, is_tlab); 685 result = expand_heap_and_allocate(size, is_tlab);
686 } 686 }
687 return result; // could be null if we are out of space 687 return result; // could be null if we are out of space
688 } else if (!gch->incremental_collection_will_fail()) { 688 } else if (!gch->incremental_collection_will_fail(false /* don't consult_young */)) {
689 // Do an incremental collection. 689 // Do an incremental collection.
690 gch->do_collection(false /* full */, 690 gch->do_collection(false /* full */,
691 false /* clear_all_soft_refs */, 691 false /* clear_all_soft_refs */,
692 size /* size */, 692 size /* size */,
693 is_tlab /* is_tlab */, 693 is_tlab /* is_tlab */,
694 number_of_generations() - 1 /* max_level */); 694 number_of_generations() - 1 /* max_level */);
695 } else { 695 } else {
696 if (Verbose && PrintGCDetails) {
697 gclog_or_tty->print(" :: Trying full because partial may fail :: ");
698 }
696 // Try a full collection; see delta for bug id 6266275 699 // Try a full collection; see delta for bug id 6266275
697 // for the original code and why this has been simplified 700 // for the original code and why this has been simplified
698 // with from-space allocation criteria modified and 701 // with from-space allocation criteria modified and
699 // such allocation moved out of the safepoint path. 702 // such allocation moved out of the safepoint path.
700 gch->do_collection(true /* full */, 703 gch->do_collection(true /* full */,