mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
7001033: assert(gch->gc_cause() == GCCause::_scavenge_alot || !gch->incremental_collection_failed())
7002546: regression on SpecJbb2005 on 7b118 comparing to 7b117 on small heaps 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
This commit is contained in:
parent
4aaa89ea60
commit
544b475fc5
6 changed files with 54 additions and 23 deletions
|
@ -896,7 +896,7 @@ bool ConcurrentMarkSweepGeneration::promotion_attempt_is_safe(size_t max_promoti
|
|||
size_t available = max_available();
|
||||
size_t av_promo = (size_t)gc_stats()->avg_promoted()->padded_average();
|
||||
bool res = (available >= av_promo) || (available >= max_promotion_in_bytes);
|
||||
if (PrintGC && Verbose) {
|
||||
if (Verbose && PrintGCDetails) {
|
||||
gclog_or_tty->print_cr(
|
||||
"CMS: promo attempt is%s safe: available("SIZE_FORMAT") %s av_promo("SIZE_FORMAT"),"
|
||||
"max_promo("SIZE_FORMAT")",
|
||||
|
@ -1562,8 +1562,8 @@ bool CMSCollector::shouldConcurrentCollect() {
|
|||
GenCollectedHeap* gch = GenCollectedHeap::heap();
|
||||
assert(gch->collector_policy()->is_two_generation_policy(),
|
||||
"You may want to check the correctness of the following");
|
||||
if (gch->incremental_collection_will_fail()) {
|
||||
if (PrintGCDetails && Verbose) {
|
||||
if (gch->incremental_collection_will_fail(true /* consult_young */)) {
|
||||
if (Verbose && PrintGCDetails) {
|
||||
gclog_or_tty->print("CMSCollector: collect because incremental collection will fail ");
|
||||
}
|
||||
return true;
|
||||
|
@ -1927,7 +1927,7 @@ void CMSCollector::decide_foreground_collection_type(
|
|||
"You may want to check the correctness of the following");
|
||||
// Inform cms gen if this was due to partial collection failing.
|
||||
// The CMS gen may use this fact to determine its expansion policy.
|
||||
if (gch->incremental_collection_will_fail()) {
|
||||
if (gch->incremental_collection_will_fail(false /* don't consult_young */)) {
|
||||
assert(!_cmsGen->incremental_collection_failed(),
|
||||
"Should have been noticed, reacted to and cleared");
|
||||
_cmsGen->set_incremental_collection_failed();
|
||||
|
@ -1936,7 +1936,7 @@ void CMSCollector::decide_foreground_collection_type(
|
|||
UseCMSCompactAtFullCollection &&
|
||||
((_full_gcs_since_conc_gc >= CMSFullGCsBeforeCompaction) ||
|
||||
GCCause::is_user_requested_gc(gch->gc_cause()) ||
|
||||
gch->incremental_collection_will_fail());
|
||||
gch->incremental_collection_will_fail(true /* consult_young */));
|
||||
*should_start_over = false;
|
||||
if (clear_all_soft_refs && !*should_compact) {
|
||||
// We are about to do a last ditch collection attempt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue