< prev index next >

src/hotspot/share/gc/g1/g1FullCollector.cpp

Print this page




 209   run_task(&marking_task);
 210 
 211   // Process references discovered during marking.
 212   G1FullGCReferenceProcessingExecutor reference_processing(this);
 213   reference_processing.execute(scope()->timer(), scope()->tracer());
 214 
 215   // Weak oops cleanup.
 216   {
 217     GCTraceTime(Debug, gc, phases) trace("Phase 1: Weak Processing", scope()->timer());
 218     WeakProcessor::weak_oops_do(&_is_alive, &do_nothing_cl);
 219   }
 220 
 221   // Class unloading and cleanup.
 222   if (ClassUnloading) {
 223     GCTraceTime(Debug, gc, phases) debug("Phase 1: Class Unloading and Cleanup", scope()->timer());
 224     // Unload classes and purge the SystemDictionary.
 225     bool purged_class = SystemDictionary::do_unloading(scope()->timer());
 226     _heap->complete_cleaning(&_is_alive, purged_class);
 227   } else {
 228     GCTraceTime(Debug, gc, phases) debug("Phase 1: String and Symbol Tables Cleanup", scope()->timer());
 229     // If no class unloading just clean out strings and symbols.
 230     _heap->partial_cleaning(&_is_alive, true, true, G1StringDedup::is_enabled());
 231   }
 232 
 233   scope()->tracer()->report_object_count_after_gc(&_is_alive);
 234 }
 235 
 236 void G1FullCollector::phase2_prepare_compaction() {
 237   GCTraceTime(Info, gc, phases) info("Phase 2: Prepare for compaction", scope()->timer());
 238   G1FullGCPrepareTask task(this);
 239   run_task(&task);
 240 
 241   // To avoid OOM when there is memory left.
 242   if (!task.has_freed_regions()) {
 243     task.prepare_serial_compaction();
 244   }
 245 }
 246 
 247 void G1FullCollector::phase3_adjust_pointers() {
 248   // Adjust the pointers to reflect the new locations
 249   GCTraceTime(Info, gc, phases) info("Phase 3: Adjust pointers", scope()->timer());
 250 




 209   run_task(&marking_task);
 210 
 211   // Process references discovered during marking.
 212   G1FullGCReferenceProcessingExecutor reference_processing(this);
 213   reference_processing.execute(scope()->timer(), scope()->tracer());
 214 
 215   // Weak oops cleanup.
 216   {
 217     GCTraceTime(Debug, gc, phases) trace("Phase 1: Weak Processing", scope()->timer());
 218     WeakProcessor::weak_oops_do(&_is_alive, &do_nothing_cl);
 219   }
 220 
 221   // Class unloading and cleanup.
 222   if (ClassUnloading) {
 223     GCTraceTime(Debug, gc, phases) debug("Phase 1: Class Unloading and Cleanup", scope()->timer());
 224     // Unload classes and purge the SystemDictionary.
 225     bool purged_class = SystemDictionary::do_unloading(scope()->timer());
 226     _heap->complete_cleaning(&_is_alive, purged_class);
 227   } else {
 228     GCTraceTime(Debug, gc, phases) debug("Phase 1: String and Symbol Tables Cleanup", scope()->timer());
 229     // If no class unloading just clean out strings.
 230     _heap->partial_cleaning(&_is_alive, true, G1StringDedup::is_enabled());
 231   }
 232 
 233   scope()->tracer()->report_object_count_after_gc(&_is_alive);
 234 }
 235 
 236 void G1FullCollector::phase2_prepare_compaction() {
 237   GCTraceTime(Info, gc, phases) info("Phase 2: Prepare for compaction", scope()->timer());
 238   G1FullGCPrepareTask task(this);
 239   run_task(&task);
 240 
 241   // To avoid OOM when there is memory left.
 242   if (!task.has_freed_regions()) {
 243     task.prepare_serial_compaction();
 244   }
 245 }
 246 
 247 void G1FullCollector::phase3_adjust_pointers() {
 248   // Adjust the pointers to reflect the new locations
 249   GCTraceTime(Info, gc, phases) info("Phase 3: Adjust pointers", scope()->timer());
 250 


< prev index next >