mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
6896603: CMS/GCH: collection_attempt_is_safe() ergo should use more recent data
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
This commit is contained in:
parent
554e77efb4
commit
cbc7f8756a
14 changed files with 101 additions and 222 deletions
|
@ -846,7 +846,7 @@ void ParNewGeneration::collect(bool full,
|
|||
// 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 @@ void ParNewGeneration::collect(bool full,
|
|||
|
||||
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 @@ void ParNewGeneration::collect(bool full,
|
|||
// 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 @@ oop ParNewGeneration::copy_to_survivor_space_avoiding_promotion_undo(
|
|||
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 @@ oop ParNewGeneration::copy_to_survivor_space_with_undo(
|
|||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue