src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

Print this page
rev 5098 : 8020692: TestGCEventMixed.java failed because of timestamp in event after end event


2476     _cmThread->clear_in_progress();
2477   }
2478 
2479   // This notify_all() will ensure that a thread that called
2480   // System.gc() with (with ExplicitGCInvokesConcurrent set or not)
2481   // and it's waiting for a full GC to finish will be woken up. It is
2482   // waiting in VM_G1IncCollectionPause::doit_epilogue().
2483   FullGCCount_lock->notify_all();
2484 }
2485 
2486 void G1CollectedHeap::register_concurrent_cycle_start(jlong start_time) {
2487   _concurrent_cycle_started = true;
2488   _gc_timer_cm->register_gc_start(start_time);
2489 
2490   _gc_tracer_cm->report_gc_start(gc_cause(), _gc_timer_cm->gc_start());
2491   trace_heap_before_gc(_gc_tracer_cm);
2492 }
2493 
2494 void G1CollectedHeap::register_concurrent_cycle_end() {
2495   if (_concurrent_cycle_started) {
2496     _gc_timer_cm->register_gc_end(os::elapsed_counter());
2497 
2498     if (_cm->has_aborted()) {
2499       _gc_tracer_cm->report_concurrent_mode_failure();
2500     }


2501     _gc_tracer_cm->report_gc_end(_gc_timer_cm->gc_end(), _gc_timer_cm->time_partitions());
2502 
2503     _concurrent_cycle_started = false;
2504   }
2505 }
2506 
2507 void G1CollectedHeap::trace_heap_after_concurrent_cycle() {
2508   if (_concurrent_cycle_started) {
2509     trace_heap_after_gc(_gc_tracer_cm);
2510   }
2511 }
2512 
2513 G1YCType G1CollectedHeap::yc_type() {
2514   bool is_young = g1_policy()->gcs_are_young();
2515   bool is_initial_mark = g1_policy()->during_initial_mark_pause();
2516   bool is_during_mark = mark_in_progress();
2517 
2518   if (is_initial_mark) {
2519     return InitialMark;
2520   } else if (is_during_mark) {




2476     _cmThread->clear_in_progress();
2477   }
2478 
2479   // This notify_all() will ensure that a thread that called
2480   // System.gc() with (with ExplicitGCInvokesConcurrent set or not)
2481   // and it's waiting for a full GC to finish will be woken up. It is
2482   // waiting in VM_G1IncCollectionPause::doit_epilogue().
2483   FullGCCount_lock->notify_all();
2484 }
2485 
2486 void G1CollectedHeap::register_concurrent_cycle_start(jlong start_time) {
2487   _concurrent_cycle_started = true;
2488   _gc_timer_cm->register_gc_start(start_time);
2489 
2490   _gc_tracer_cm->report_gc_start(gc_cause(), _gc_timer_cm->gc_start());
2491   trace_heap_before_gc(_gc_tracer_cm);
2492 }
2493 
2494 void G1CollectedHeap::register_concurrent_cycle_end() {
2495   if (_concurrent_cycle_started) {


2496     if (_cm->has_aborted()) {
2497       _gc_tracer_cm->report_concurrent_mode_failure();
2498     }
2499 
2500     _gc_timer_cm->register_gc_end(os::elapsed_counter());
2501     _gc_tracer_cm->report_gc_end(_gc_timer_cm->gc_end(), _gc_timer_cm->time_partitions());
2502 
2503     _concurrent_cycle_started = false;
2504   }
2505 }
2506 
2507 void G1CollectedHeap::trace_heap_after_concurrent_cycle() {
2508   if (_concurrent_cycle_started) {
2509     trace_heap_after_gc(_gc_tracer_cm);
2510   }
2511 }
2512 
2513 G1YCType G1CollectedHeap::yc_type() {
2514   bool is_young = g1_policy()->gcs_are_young();
2515   bool is_initial_mark = g1_policy()->during_initial_mark_pause();
2516   bool is_during_mark = mark_in_progress();
2517 
2518   if (is_initial_mark) {
2519     return InitialMark;
2520   } else if (is_during_mark) {