comparison src/share/vm/memory/genCollectedHeap.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 3582bf76420e
comparison
equal deleted inserted replaced
1993:459fad165e5e 1994:6cd6d394f280
933 933
934 934
935 void GenCollectedHeap::do_full_collection(bool clear_all_soft_refs, 935 void GenCollectedHeap::do_full_collection(bool clear_all_soft_refs,
936 int max_level) { 936 int max_level) {
937 int local_max_level; 937 int local_max_level;
938 if (!incremental_collection_will_fail() && 938 if (!incremental_collection_will_fail(false /* don't consult_young */) &&
939 gc_cause() == GCCause::_gc_locker) { 939 gc_cause() == GCCause::_gc_locker) {
940 local_max_level = 0; 940 local_max_level = 0;
941 } else { 941 } else {
942 local_max_level = max_level; 942 local_max_level = max_level;
943 } 943 }
949 local_max_level /* max_level */); 949 local_max_level /* max_level */);
950 // Hack XXX FIX ME !!! 950 // Hack XXX FIX ME !!!
951 // A scavenge may not have been attempted, or may have 951 // A scavenge may not have been attempted, or may have
952 // been attempted and failed, because the old gen was too full 952 // been attempted and failed, because the old gen was too full
953 if (local_max_level == 0 && gc_cause() == GCCause::_gc_locker && 953 if (local_max_level == 0 && gc_cause() == GCCause::_gc_locker &&
954 incremental_collection_will_fail()) { 954 incremental_collection_will_fail(false /* don't consult_young */)) {
955 if (PrintGCDetails) { 955 if (PrintGCDetails) {
956 gclog_or_tty->print_cr("GC locker: Trying a full collection " 956 gclog_or_tty->print_cr("GC locker: Trying a full collection "
957 "because scavenge failed"); 957 "because scavenge failed");
958 } 958 }
959 // This time allow the old gen to be collected as well 959 // This time allow the old gen to be collected as well