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:
Y. Srinivas Ramakrishna 2010-10-23 23:03:49 -07:00
parent 554e77efb4
commit cbc7f8756a
14 changed files with 101 additions and 222 deletions

View file

@ -165,15 +165,16 @@ size_t Generation::max_contiguous_available() const {
return max;
}
bool Generation::promotion_attempt_is_safe(size_t promotion_in_bytes,
bool not_used) const {
bool Generation::promotion_attempt_is_safe(size_t max_promotion_in_bytes) const {
size_t available = max_contiguous_available();
bool res = (available >= max_promotion_in_bytes);
if (PrintGC && Verbose) {
gclog_or_tty->print_cr("Generation::promotion_attempt_is_safe"
" contiguous_available: " SIZE_FORMAT
" promotion_in_bytes: " SIZE_FORMAT,
max_contiguous_available(), promotion_in_bytes);
gclog_or_tty->print_cr(
"Generation: promo attempt is%s safe: available("SIZE_FORMAT") %s max_promo("SIZE_FORMAT")",
res? "":" not", available, res? ">=":"<",
max_promotion_in_bytes);
}
return max_contiguous_available() >= promotion_in_bytes;
return res;
}
// Ignores "ref" and calls allocate().