src/share/vm/memory/genMarkSweep.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/memory/genMarkSweep.cpp

src/share/vm/memory/genMarkSweep.cpp

Print this page
rev 7211 : [mq]: remove_ngen
rev 7212 : [mq]: remove_get_gen

*** 113,128 **** // If compaction completely evacuated all generations younger than this // one, then we can clear the card table. Otherwise, we must invalidate // it (consider all cards dirty). In the future, we might consider doing // compaction within generations only, and doing card-table sliding. bool all_empty = true; ! for (int i = 0; all_empty && i < level; i++) { ! Generation* g = gch->get_gen(i); ! all_empty = all_empty && gch->get_gen(i)->used() == 0; } GenRemSet* rs = gch->rem_set(); ! Generation* old_gen = gch->get_gen(level); // Clear/invalidate below make use of the "prev_used_regions" saved earlier. if (all_empty) { // We've evacuated all generations below us. rs->clear_into_younger(old_gen); } else { --- 113,129 ---- // If compaction completely evacuated all generations younger than this // one, then we can clear the card table. Otherwise, we must invalidate // it (consider all cards dirty). In the future, we might consider doing // compaction within generations only, and doing card-table sliding. bool all_empty = true; ! if (level == 1) { ! all_empty = gch->young_gen()->used() == 0; } + GenRemSet* rs = gch->rem_set(); ! assert(level == 1, "Code will break if this isn't true."); ! Generation* old_gen = gch->old_gen(); // Clear/invalidate below make use of the "prev_used_regions" saved earlier. if (all_empty) { // We've evacuated all generations below us. rs->clear_into_younger(old_gen); } else {
*** 158,168 **** void GenMarkSweep::allocate_stacks() { GenCollectedHeap* gch = GenCollectedHeap::heap(); // Scratch request on behalf of oldest generation; will do no // allocation. ! ScratchBlock* scratch = gch->gather_scratch(gch->get_gen(gch->_n_gens-1), 0); // $$$ To cut a corner, we'll only use the first scratch block, and then // revert to malloc. if (scratch != NULL) { _preserved_count_max = --- 159,169 ---- void GenMarkSweep::allocate_stacks() { GenCollectedHeap* gch = GenCollectedHeap::heap(); // Scratch request on behalf of oldest generation; will do no // allocation. ! ScratchBlock* scratch = gch->gather_scratch(gch->old_gen(), 0); // $$$ To cut a corner, we'll only use the first scratch block, and then // revert to malloc. if (scratch != NULL) { _preserved_count_max =
*** 198,208 **** // Because follow_root_closure is created statically, cannot // use OopsInGenClosure constructor which takes a generation, // as the Universe has not been created when the static constructors // are run. ! follow_root_closure.set_orig_generation(gch->get_gen(level)); // Need new claim bits before marking starts. ClassLoaderDataGraph::clear_claimed_marks(); gch->gen_process_roots(level, --- 199,210 ---- // Because follow_root_closure is created statically, cannot // use OopsInGenClosure constructor which takes a generation, // as the Universe has not been created when the static constructors // are run. ! assert(level == 1, "We don't use mark-sweep on young generations"); ! follow_root_closure.set_orig_generation(gch->old_gen()); // Need new claim bits before marking starts. ClassLoaderDataGraph::clear_claimed_marks(); gch->gen_process_roots(level,
*** 286,296 **** // Because the closure below is created statically, we cannot // use OopsInGenClosure constructor which takes a generation, // as the Universe has not been created when the static constructors // are run. ! adjust_pointer_closure.set_orig_generation(gch->get_gen(level)); gch->gen_process_roots(level, false, // Younger gens are not roots. true, // activate StrongRootsScope SharedHeap::SO_AllCodeCache, --- 288,299 ---- // Because the closure below is created statically, we cannot // use OopsInGenClosure constructor which takes a generation, // as the Universe has not been created when the static constructors // are run. ! assert(level == 1, "We don't use mark-sweep on young generations."); ! adjust_pointer_closure.set_orig_generation(gch->old_gen()); gch->gen_process_roots(level, false, // Younger gens are not roots. true, // activate StrongRootsScope SharedHeap::SO_AllCodeCache,
src/share/vm/memory/genMarkSweep.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File