250
251 inline void CMSCollector::icms_wait() {
252 if (CMSIncrementalMode) {
253 cmsThread()->icms_wait();
254 }
255 }
256
257 inline void CMSCollector::save_sweep_limits() {
258 _cmsGen->save_sweep_limit();
259 _permGen->save_sweep_limit();
260 }
261
262 inline bool CMSCollector::is_dead_obj(oop obj) const {
263 HeapWord* addr = (HeapWord*)obj;
264 assert((_cmsGen->cmsSpace()->is_in_reserved(addr)
265 && _cmsGen->cmsSpace()->block_is_obj(addr))
266 ||
267 (_permGen->cmsSpace()->is_in_reserved(addr)
268 && _permGen->cmsSpace()->block_is_obj(addr)),
269 "must be object");
270 return cms_should_unload_classes() &&
271 _collectorState == Sweeping &&
272 !_markBitMap.isMarked(addr);
273 }
274
275 inline bool CMSCollector::should_abort_preclean() const {
276 // We are in the midst of an "abortable preclean" and either
277 // scavenge is done or foreground GC wants to take over collection
278 return _collectorState == AbortablePreclean &&
279 (_abort_preclean || _foregroundGCIsActive ||
280 GenCollectedHeap::heap()->incremental_collection_will_fail());
281 }
282
283 inline size_t CMSCollector::get_eden_used() const {
284 return _young_gen->as_DefNewGeneration()->eden()->used();
285 }
286
287 inline size_t CMSCollector::get_eden_capacity() const {
288 return _young_gen->as_DefNewGeneration()->eden()->capacity();
289 }
290
|
250
251 inline void CMSCollector::icms_wait() {
252 if (CMSIncrementalMode) {
253 cmsThread()->icms_wait();
254 }
255 }
256
257 inline void CMSCollector::save_sweep_limits() {
258 _cmsGen->save_sweep_limit();
259 _permGen->save_sweep_limit();
260 }
261
262 inline bool CMSCollector::is_dead_obj(oop obj) const {
263 HeapWord* addr = (HeapWord*)obj;
264 assert((_cmsGen->cmsSpace()->is_in_reserved(addr)
265 && _cmsGen->cmsSpace()->block_is_obj(addr))
266 ||
267 (_permGen->cmsSpace()->is_in_reserved(addr)
268 && _permGen->cmsSpace()->block_is_obj(addr)),
269 "must be object");
270 return should_unload_classes() &&
271 _collectorState == Sweeping &&
272 !_markBitMap.isMarked(addr);
273 }
274
275 inline bool CMSCollector::should_abort_preclean() const {
276 // We are in the midst of an "abortable preclean" and either
277 // scavenge is done or foreground GC wants to take over collection
278 return _collectorState == AbortablePreclean &&
279 (_abort_preclean || _foregroundGCIsActive ||
280 GenCollectedHeap::heap()->incremental_collection_will_fail());
281 }
282
283 inline size_t CMSCollector::get_eden_used() const {
284 return _young_gen->as_DefNewGeneration()->eden()->used();
285 }
286
287 inline size_t CMSCollector::get_eden_capacity() const {
288 return _young_gen->as_DefNewGeneration()->eden()->capacity();
289 }
290
|