comparison src/share/vm/memory/genCollectedHeap.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 8b10f48633dc
children f95d63e2154a
comparison
equal deleted inserted replaced
1887:cd3ef3fd20dd 1888:a7214d79fcf1
140 _gens[i] = _gen_specs[i]->init(this_rs, i, rem_set()); 140 _gens[i] = _gen_specs[i]->init(this_rs, i, rem_set());
141 heap_rs = heap_rs.last_part(_gen_specs[i]->max_size()); 141 heap_rs = heap_rs.last_part(_gen_specs[i]->max_size());
142 } 142 }
143 _perm_gen = perm_gen_spec->init(heap_rs, PermSize, rem_set()); 143 _perm_gen = perm_gen_spec->init(heap_rs, PermSize, rem_set());
144 144
145 clear_incremental_collection_will_fail(); 145 clear_incremental_collection_failed();
146 clear_last_incremental_collection_failed();
147 146
148 #ifndef SERIALGC 147 #ifndef SERIALGC
149 // If we are running CMS, create the collector responsible 148 // If we are running CMS, create the collector responsible
150 // for collecting the CMS generations. 149 // for collecting the CMS generations.
151 if (collector_policy()->is_concurrent_mark_sweep_policy()) { 150 if (collector_policy()->is_concurrent_mark_sweep_policy()) {
1345 } 1344 }
1346 GenGCEpilogueClosure(bool full) : _full(full) {}; 1345 GenGCEpilogueClosure(bool full) : _full(full) {};
1347 }; 1346 };
1348 1347
1349 void GenCollectedHeap::gc_epilogue(bool full) { 1348 void GenCollectedHeap::gc_epilogue(bool full) {
1350 // Remember if a partial collection of the heap failed, and
1351 // we did a complete collection.
1352 if (full && incremental_collection_will_fail()) {
1353 set_last_incremental_collection_failed();
1354 } else {
1355 clear_last_incremental_collection_failed();
1356 }
1357 // Clear the flag, if set; the generation gc_epilogues will set the
1358 // flag again if the condition persists despite the collection.
1359 clear_incremental_collection_will_fail();
1360
1361 #ifdef COMPILER2 1349 #ifdef COMPILER2
1362 assert(DerivedPointerTable::is_empty(), "derived pointer present"); 1350 assert(DerivedPointerTable::is_empty(), "derived pointer present");
1363 size_t actual_gap = pointer_delta((HeapWord*) (max_uintx-3), *(end_addr())); 1351 size_t actual_gap = pointer_delta((HeapWord*) (max_uintx-3), *(end_addr()));
1364 guarantee(actual_gap > (size_t)FastAllocateSizeLimit, "inline allocation wraps"); 1352 guarantee(actual_gap > (size_t)FastAllocateSizeLimit, "inline allocation wraps");
1365 #endif /* COMPILER2 */ 1353 #endif /* COMPILER2 */