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