< prev index next >

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

Print this page
rev 8957 : 8223147: JFR Backport
8199712: Flight Recorder
8203346: JFR: Inconsistent signature of jfr_add_string_constant
8195817: JFR.stop should require name of recording
8195818: JFR.start should increase autogenerated name by one
8195819: Remove recording=x from jcmd JFR.check output
8203921: JFR thread sampling is missing fixes from JDK-8194552
8203929: Limit amount of data for JFR.dump
8203664: JFR start failure after AppCDS archive created with JFR StartFlightRecording
8003209: JFR events for network utilization
8207392: [PPC64] Implement JFR profiling


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()) {


< prev index next >