Mercurial > hg > truffle
diff src/share/vm/gc_implementation/parNew/parNewGeneration.cpp @ 1888:a7214d79fcf1
6896603: CMS/GCH: collection_attempt_is_safe() ergo should use more recent data
Summary: Deprecated HandlePromotionFailure, removing the ability to turn off that feature, did away with one epoch look-ahead when deciding if a scavenge is likely to fail, relying on current data.
Reviewed-by: jmasa, johnc, poonam
author | ysr |
---|---|
date | Sat, 23 Oct 2010 23:03:49 -0700 |
parents | 894b1d7c7e01 |
children | f95d63e2154a |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp Thu Oct 21 17:29:24 2010 -0700 +++ b/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp Sat Oct 23 23:03:49 2010 -0700 @@ -846,7 +846,7 @@ // from this generation, pass on collection; let the next generation // do it. if (!collection_attempt_is_safe()) { - gch->set_incremental_collection_will_fail(); + gch->set_incremental_collection_failed(); // slight lie, in that we did not even attempt one return; } assert(to()->is_empty(), "Else not collection_attempt_is_safe"); @@ -935,8 +935,6 @@ assert(to()->is_empty(), "to space should be empty now"); } else { - assert(HandlePromotionFailure, - "Should only be here if promotion failure handling is on"); assert(_promo_failure_scan_stack.is_empty(), "post condition"); _promo_failure_scan_stack.clear(true); // Clear cached segments. @@ -947,7 +945,7 @@ // All the spaces are in play for mark-sweep. swap_spaces(); // Make life simpler for CMS || rescan; see 6483690. from()->set_next_compaction_space(to()); - gch->set_incremental_collection_will_fail(); + gch->set_incremental_collection_failed(); // Inform the next generation that a promotion failure occurred. _next_gen->promotion_failure_occurred(); @@ -1092,11 +1090,6 @@ old, m, sz); if (new_obj == NULL) { - if (!HandlePromotionFailure) { - // A failed promotion likely means the MaxLiveObjectEvacuationRatio flag - // is incorrectly set. In any case, its seriously wrong to be here! - vm_exit_out_of_memory(sz*wordSize, "promotion"); - } // promotion failed, forward to self _promotion_failed = true; new_obj = old; @@ -1206,12 +1199,6 @@ old, m, sz); if (new_obj == NULL) { - if (!HandlePromotionFailure) { - // A failed promotion likely means the MaxLiveObjectEvacuationRatio - // flag is incorrectly set. In any case, its seriously wrong to be - // here! - vm_exit_out_of_memory(sz*wordSize, "promotion"); - } // promotion failed, forward to self forward_ptr = old->forward_to_atomic(old); new_obj = old;