< prev index next >

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

Print this page
rev 60422 : [mq]: 8248401-ayang-review


 218       // If this was the requested GC cycle, notify waiters about it
 219       if (explicit_gc_requested || implicit_gc_requested) {
 220         notify_gc_waiters();
 221       }
 222 
 223       // If this was the allocation failure GC cycle, notify waiters about it
 224       if (alloc_failure_pending) {
 225         notify_alloc_failure_waiters();
 226       }
 227 
 228       // Report current free set state at the end of cycle, whether
 229       // it is a normal completion, or the abort.
 230       {
 231         ShenandoahHeapLocker locker(heap->lock());
 232         heap->free_set()->log_status();
 233 
 234         // Notify Universe about new heap usage. This has implications for
 235         // global soft refs policy, and we better report it every time heap
 236         // usage goes down.
 237         Universe::update_heap_info_at_gc();



 238       }
 239 
 240       // Disable forced counters update, and update counters one more time
 241       // to capture the state at the end of GC session.
 242       handle_force_counters_update();
 243       set_forced_counters_update(false);
 244 
 245       // Retract forceful part of soft refs policy
 246       heap->soft_ref_policy()->set_should_clear_all_soft_refs(false);
 247 
 248       // Clear metaspace oom flag, if current cycle unloaded classes
 249       if (heap->unload_classes()) {
 250         heuristics->clear_metaspace_oom();
 251       }
 252 
 253       // Commit worker statistics to cycle data
 254       heap->phase_timings()->flush_par_workers_to_cycle();
 255       if (ShenandoahPacing) {
 256         heap->pacer()->flush_stats_to_cycle();
 257       }




 218       // If this was the requested GC cycle, notify waiters about it
 219       if (explicit_gc_requested || implicit_gc_requested) {
 220         notify_gc_waiters();
 221       }
 222 
 223       // If this was the allocation failure GC cycle, notify waiters about it
 224       if (alloc_failure_pending) {
 225         notify_alloc_failure_waiters();
 226       }
 227 
 228       // Report current free set state at the end of cycle, whether
 229       // it is a normal completion, or the abort.
 230       {
 231         ShenandoahHeapLocker locker(heap->lock());
 232         heap->free_set()->log_status();
 233 
 234         // Notify Universe about new heap usage. This has implications for
 235         // global soft refs policy, and we better report it every time heap
 236         // usage goes down.
 237         Universe::update_heap_info_at_gc();
 238 
 239         // Signal that we have completed a visit to all live objects.
 240         Universe::heap()->record_whole_heap_examined_timestamp();
 241       }
 242 
 243       // Disable forced counters update, and update counters one more time
 244       // to capture the state at the end of GC session.
 245       handle_force_counters_update();
 246       set_forced_counters_update(false);
 247 
 248       // Retract forceful part of soft refs policy
 249       heap->soft_ref_policy()->set_should_clear_all_soft_refs(false);
 250 
 251       // Clear metaspace oom flag, if current cycle unloaded classes
 252       if (heap->unload_classes()) {
 253         heuristics->clear_metaspace_oom();
 254       }
 255 
 256       // Commit worker statistics to cycle data
 257       heap->phase_timings()->flush_par_workers_to_cycle();
 258       if (ShenandoahPacing) {
 259         heap->pacer()->flush_stats_to_cycle();
 260       }


< prev index next >