< prev index next >

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

Print this page




4071         // region(s) so that all the ALLOC / RETIRE events are generated
4072         // before the start GC event.
4073         _hr_printer.start_gc(false /* full */, (size_t) total_collections());
4074 
4075         // This timing is only used by the ergonomics to handle our pause target.
4076         // It is unclear why this should not include the full pause. We will
4077         // investigate this in CR 7178365.
4078         //
4079         // Preserving the old comment here if that helps the investigation:
4080         //
4081         // The elapsed time induced by the start time below deliberately elides
4082         // the possible verification above.
4083         double sample_start_time_sec = os::elapsedTime();
4084 
4085 #if YOUNG_LIST_VERBOSE
4086         gclog_or_tty->print_cr("\nBefore recording pause start.\nYoung_list:");
4087         _young_list->print();
4088         g1_policy()->print_collection_set(g1_policy()->inc_cset_head(), gclog_or_tty);
4089 #endif // YOUNG_LIST_VERBOSE
4090 
4091         g1_policy()->record_collection_pause_start(sample_start_time_sec);
4092 
4093         double scan_wait_start = os::elapsedTime();
4094         // We have to wait until the CM threads finish scanning the
4095         // root regions as it's the only way to ensure that all the
4096         // objects on them have been correctly scanned before we start
4097         // moving them during the GC.
4098         bool waited = _cm->root_regions()->wait_until_scan_finished();
4099         double wait_time_ms = 0.0;
4100         if (waited) {
4101           double scan_wait_end = os::elapsedTime();
4102           wait_time_ms = (scan_wait_end - scan_wait_start) * 1000.0;
4103         }
4104         g1_policy()->phase_times()->record_root_region_scan_wait_time(wait_time_ms);
4105 
4106 #if YOUNG_LIST_VERBOSE
4107         gclog_or_tty->print_cr("\nAfter recording pause start.\nYoung_list:");
4108         _young_list->print();
4109 #endif // YOUNG_LIST_VERBOSE
4110 
4111         if (g1_policy()->during_initial_mark_pause()) {




4071         // region(s) so that all the ALLOC / RETIRE events are generated
4072         // before the start GC event.
4073         _hr_printer.start_gc(false /* full */, (size_t) total_collections());
4074 
4075         // This timing is only used by the ergonomics to handle our pause target.
4076         // It is unclear why this should not include the full pause. We will
4077         // investigate this in CR 7178365.
4078         //
4079         // Preserving the old comment here if that helps the investigation:
4080         //
4081         // The elapsed time induced by the start time below deliberately elides
4082         // the possible verification above.
4083         double sample_start_time_sec = os::elapsedTime();
4084 
4085 #if YOUNG_LIST_VERBOSE
4086         gclog_or_tty->print_cr("\nBefore recording pause start.\nYoung_list:");
4087         _young_list->print();
4088         g1_policy()->print_collection_set(g1_policy()->inc_cset_head(), gclog_or_tty);
4089 #endif // YOUNG_LIST_VERBOSE
4090 
4091         g1_policy()->record_collection_pause_start(sample_start_time_sec, *_gc_tracer_stw);
4092 
4093         double scan_wait_start = os::elapsedTime();
4094         // We have to wait until the CM threads finish scanning the
4095         // root regions as it's the only way to ensure that all the
4096         // objects on them have been correctly scanned before we start
4097         // moving them during the GC.
4098         bool waited = _cm->root_regions()->wait_until_scan_finished();
4099         double wait_time_ms = 0.0;
4100         if (waited) {
4101           double scan_wait_end = os::elapsedTime();
4102           wait_time_ms = (scan_wait_end - scan_wait_start) * 1000.0;
4103         }
4104         g1_policy()->phase_times()->record_root_region_scan_wait_time(wait_time_ms);
4105 
4106 #if YOUNG_LIST_VERBOSE
4107         gclog_or_tty->print_cr("\nAfter recording pause start.\nYoung_list:");
4108         _young_list->print();
4109 #endif // YOUNG_LIST_VERBOSE
4110 
4111         if (g1_policy()->during_initial_mark_pause()) {


< prev index next >