Mercurial > hg > truffle
comparison src/share/vm/memory/generation.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 | c18cbe5936b8 |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1887:cd3ef3fd20dd | 1888:a7214d79fcf1 |
---|---|
163 } | 163 } |
164 } | 164 } |
165 return max; | 165 return max; |
166 } | 166 } |
167 | 167 |
168 bool Generation::promotion_attempt_is_safe(size_t promotion_in_bytes, | 168 bool Generation::promotion_attempt_is_safe(size_t max_promotion_in_bytes) const { |
169 bool not_used) const { | 169 size_t available = max_contiguous_available(); |
170 bool res = (available >= max_promotion_in_bytes); | |
170 if (PrintGC && Verbose) { | 171 if (PrintGC && Verbose) { |
171 gclog_or_tty->print_cr("Generation::promotion_attempt_is_safe" | 172 gclog_or_tty->print_cr( |
172 " contiguous_available: " SIZE_FORMAT | 173 "Generation: promo attempt is%s safe: available("SIZE_FORMAT") %s max_promo("SIZE_FORMAT")", |
173 " promotion_in_bytes: " SIZE_FORMAT, | 174 res? "":" not", available, res? ">=":"<", |
174 max_contiguous_available(), promotion_in_bytes); | 175 max_promotion_in_bytes); |
175 } | 176 } |
176 return max_contiguous_available() >= promotion_in_bytes; | 177 return res; |
177 } | 178 } |
178 | 179 |
179 // Ignores "ref" and calls allocate(). | 180 // Ignores "ref" and calls allocate(). |
180 oop Generation::promote(oop obj, size_t obj_size) { | 181 oop Generation::promote(oop obj, size_t obj_size) { |
181 assert(obj_size == (size_t)obj->size(), "bad obj_size passed in"); | 182 assert(obj_size == (size_t)obj->size(), "bad obj_size passed in"); |