< prev index next >

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

Print this page
rev 55401 : 8225582: Shenandoah: Enable concurrent evacuation of JNIHandles and CLDG roots


 360   ShenandoahGCSession session(cause);
 361 
 362   TraceCollectorStats tcs(heap->monitoring_support()->concurrent_collection_counters());
 363 
 364   // Reset for upcoming marking
 365   heap->entry_reset();
 366 
 367   // Start initial mark under STW
 368   heap->vmop_entry_init_mark();
 369 
 370   // Continue concurrent mark
 371   heap->entry_mark();
 372   if (check_cancellation_or_degen(ShenandoahHeap::_degenerated_mark)) return;
 373 
 374   // If not cancelled, can try to concurrently pre-clean
 375   heap->entry_preclean();
 376 
 377   // Complete marking under STW, and start evacuation
 378   heap->vmop_entry_final_mark();
 379 



 380   // Final mark might have reclaimed some immediate garbage, kick cleanup to reclaim
 381   // the space. This would be the last action if there is nothing to evacuate.
 382   heap->entry_cleanup();
 383 
 384   {
 385     ShenandoahHeapLocker locker(heap->lock());
 386     heap->free_set()->log_status();
 387   }
 388 
 389   // Continue the cycle with evacuation and optional update-refs.
 390   // This may be skipped if there is nothing to evacuate.
 391   // If so, evac_in_progress would be unset by collection set preparation code.
 392   if (heap->is_evacuation_in_progress()) {
 393     // Concurrently evacuate
 394     heap->entry_evac();
 395     if (check_cancellation_or_degen(ShenandoahHeap::_degenerated_evac)) return;
 396 
 397     // Perform update-refs phase, if required. This phase can be skipped if heuristics
 398     // decides to piggy-back the update-refs on the next marking cycle. On either path,
 399     // we need to turn off evacuation: either in init-update-refs, or in final-evac.




 360   ShenandoahGCSession session(cause);
 361 
 362   TraceCollectorStats tcs(heap->monitoring_support()->concurrent_collection_counters());
 363 
 364   // Reset for upcoming marking
 365   heap->entry_reset();
 366 
 367   // Start initial mark under STW
 368   heap->vmop_entry_init_mark();
 369 
 370   // Continue concurrent mark
 371   heap->entry_mark();
 372   if (check_cancellation_or_degen(ShenandoahHeap::_degenerated_mark)) return;
 373 
 374   // If not cancelled, can try to concurrently pre-clean
 375   heap->entry_preclean();
 376 
 377   // Complete marking under STW, and start evacuation
 378   heap->vmop_entry_final_mark();
 379 
 380   // Evacuate concurrent roots
 381   heap->entry_concurrent_roots();
 382 
 383   // Final mark might have reclaimed some immediate garbage, kick cleanup to reclaim
 384   // the space. This would be the last action if there is nothing to evacuate.
 385   heap->entry_cleanup();
 386 
 387   {
 388     ShenandoahHeapLocker locker(heap->lock());
 389     heap->free_set()->log_status();
 390   }
 391 
 392   // Continue the cycle with evacuation and optional update-refs.
 393   // This may be skipped if there is nothing to evacuate.
 394   // If so, evac_in_progress would be unset by collection set preparation code.
 395   if (heap->is_evacuation_in_progress()) {
 396     // Concurrently evacuate
 397     heap->entry_evac();
 398     if (check_cancellation_or_degen(ShenandoahHeap::_degenerated_evac)) return;
 399 
 400     // Perform update-refs phase, if required. This phase can be skipped if heuristics
 401     // decides to piggy-back the update-refs on the next marking cycle. On either path,
 402     // we need to turn off evacuation: either in init-update-refs, or in final-evac.


< prev index next >