< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahOldGC.cpp

Print this page

119   assert(!heap->is_evacuation_in_progress(), "Old gen evacuations are not supported");
120 
121   // Process weak roots that might still point to regions that would be broken by cleanup
122   if (heap->is_concurrent_weak_root_in_progress()) {
123     entry_weak_refs();
124     entry_weak_roots();
125   }
126 
127   // Final mark might have reclaimed some immediate garbage, kick cleanup to reclaim
128   // the space. This would be the last action if there is nothing to evacuate.
129   entry_cleanup_early();
130 
131   assert(!heap->is_concurrent_strong_root_in_progress(), "No evacuations during old gc.");
132 
133   // We must execute this vm operation if we completed final mark. We cannot
134   // return from here with weak roots in progress. This is not a valid gc state
135   // for any young collections (or allocation failures) that interrupt the old
136   // collection.
137   heap->concurrent_final_roots();
138 







139   // After concurrent old marking finishes, we reclaim immediate garbage. Further, we may also want to expand OLD in order
140   // to make room for anticipated promotions and/or for mixed evacuations.  Mixed evacuations are especially likely to
141   // follow the end of OLD marking.
142   heap->rebuild_free_set_within_phase();
143   heap->free_set()->log_status_under_lock();
144   return true;
145 }

119   assert(!heap->is_evacuation_in_progress(), "Old gen evacuations are not supported");
120 
121   // Process weak roots that might still point to regions that would be broken by cleanup
122   if (heap->is_concurrent_weak_root_in_progress()) {
123     entry_weak_refs();
124     entry_weak_roots();
125   }
126 
127   // Final mark might have reclaimed some immediate garbage, kick cleanup to reclaim
128   // the space. This would be the last action if there is nothing to evacuate.
129   entry_cleanup_early();
130 
131   assert(!heap->is_concurrent_strong_root_in_progress(), "No evacuations during old gc.");
132 
133   // We must execute this vm operation if we completed final mark. We cannot
134   // return from here with weak roots in progress. This is not a valid gc state
135   // for any young collections (or allocation failures) that interrupt the old
136   // collection.
137   heap->concurrent_final_roots();
138 
139   // Arm the nmethods to possibly flip the barriers to idle.
140   vmop_entry_final_verify();
141 
142   // Now we are back at concurrent phase, process nmethods to fix their barriers.
143   // TODO: Is this really safe to do when we overlap with young GC?
144   ShenandoahCodeRoots::disarm_nmethods();
145 
146   // After concurrent old marking finishes, we reclaim immediate garbage. Further, we may also want to expand OLD in order
147   // to make room for anticipated promotions and/or for mixed evacuations.  Mixed evacuations are especially likely to
148   // follow the end of OLD marking.
149   heap->rebuild_free_set_within_phase();
150   heap->free_set()->log_status_under_lock();
151   return true;
152 }
< prev index next >