79 CodeCache::gc_prologue(); 80 81 // Increment the invocation count 82 _total_invocations++; 83 84 // Capture heap size before collection for printing. 85 size_t gch_prev_used = gch->used(); 86 87 // Capture used regions for each generation that will be 88 // subject to collection, so that card table adjustments can 89 // be made intelligently (see clear / invalidate further below). 90 gch->save_used_regions(); 91 92 allocate_stacks(); 93 94 mark_sweep_phase1(clear_all_softrefs); 95 96 mark_sweep_phase2(); 97 98 // Don't add any more derived pointers during phase3 99 COMPILER2_PRESENT(assert(DerivedPointerTable::is_active(), "Sanity")); 100 COMPILER2_PRESENT(DerivedPointerTable::set_active(false)); 101 102 mark_sweep_phase3(); 103 104 mark_sweep_phase4(); 105 106 restore_marks(); 107 108 // Set saved marks for allocation profiler (and other things? -- dld) 109 // (Should this be in general part?) 110 gch->save_marks(); 111 112 deallocate_stacks(); 113 114 // If compaction completely evacuated the young generation then we 115 // can clear the card table. Otherwise, we must invalidate 116 // it (consider all cards dirty). In the future, we might consider doing 117 // compaction within generations only, and doing card-table sliding. 118 GenRemSet* rs = gch->rem_set(); 119 Generation* old_gen = gch->old_gen(); 120 | 79 CodeCache::gc_prologue(); 80 81 // Increment the invocation count 82 _total_invocations++; 83 84 // Capture heap size before collection for printing. 85 size_t gch_prev_used = gch->used(); 86 87 // Capture used regions for each generation that will be 88 // subject to collection, so that card table adjustments can 89 // be made intelligently (see clear / invalidate further below). 90 gch->save_used_regions(); 91 92 allocate_stacks(); 93 94 mark_sweep_phase1(clear_all_softrefs); 95 96 mark_sweep_phase2(); 97 98 // Don't add any more derived pointers during phase3 99 #if defined(COMPILER2) || INCLUDE_JVMCI 100 assert(DerivedPointerTable::is_active(), "Sanity"); 101 DerivedPointerTable::set_active(false); 102 #endif 103 104 mark_sweep_phase3(); 105 106 mark_sweep_phase4(); 107 108 restore_marks(); 109 110 // Set saved marks for allocation profiler (and other things? -- dld) 111 // (Should this be in general part?) 112 gch->save_marks(); 113 114 deallocate_stacks(); 115 116 // If compaction completely evacuated the young generation then we 117 // can clear the card table. Otherwise, we must invalidate 118 // it (consider all cards dirty). In the future, we might consider doing 119 // compaction within generations only, and doing card-table sliding. 120 GenRemSet* rs = gch->rem_set(); 121 Generation* old_gen = gch->old_gen(); 122 |