aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/memory/collectorPolicy.cpp
diff options
context:
space:
mode:
authorysr <none@none>2010-12-07 21:55:53 -0800
committerysr <none@none>2010-12-07 21:55:53 -0800
commitbf79ca173b04d1231e039adc6faefdd7f2081827 (patch)
treebe3001c8ba93c7272df0960c81b24181e0705585 /src/share/vm/memory/collectorPolicy.cpp
parente5ca575c770a3bad414f40ad46561a42f81a330f (diff)
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
Diffstat (limited to 'src/share/vm/memory/collectorPolicy.cpp')
-rw-r--r--src/share/vm/memory/collectorPolicy.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/share/vm/memory/collectorPolicy.cpp b/src/share/vm/memory/collectorPolicy.cpp
index 73489abc3..c609da68f 100644
--- a/src/share/vm/memory/collectorPolicy.cpp
+++ b/src/share/vm/memory/collectorPolicy.cpp
@@ -685,7 +685,7 @@ HeapWord* GenCollectorPolicy::satisfy_failed_allocation(size_t size,
result = expand_heap_and_allocate(size, is_tlab);
}
return result; // could be null if we are out of space
- } else if (!gch->incremental_collection_will_fail()) {
+ } else if (!gch->incremental_collection_will_fail(false /* don't consult_young */)) {
// Do an incremental collection.
gch->do_collection(false /* full */,
false /* clear_all_soft_refs */,
@@ -693,6 +693,9 @@ HeapWord* GenCollectorPolicy::satisfy_failed_allocation(size_t size,
is_tlab /* is_tlab */,
number_of_generations() - 1 /* max_level */);
} else {
+ if (Verbose && PrintGCDetails) {
+ gclog_or_tty->print(" :: Trying full because partial may fail :: ");
+ }
// Try a full collection; see delta for bug id 6266275
// for the original code and why this has been simplified
// with from-space allocation criteria modified and