< prev index next >

src/share/vm/gc/g1/g1CollectorPolicy.cpp

Print this page
rev 9277 : imported patch 8140597-forcing-initial-mark-causes-abort-mixed-collections
rev 9278 : imported patch 8139874-after-full-gc-next-gc-is-always-young-only
rev 9279 : imported patch 8138740-start-initial-mark-right-after-mixed-gc-if-needed
rev 9281 : [mq]: 8140689-skip-last-young-if-nothing-to-do-in-mixed


 875 void G1CollectorPolicy::record_concurrent_mark_remark_start() {
 876   _mark_remark_start_sec = os::elapsedTime();
 877   collector_state()->set_during_marking(false);
 878 }
 879 
 880 void G1CollectorPolicy::record_concurrent_mark_remark_end() {
 881   double end_time_sec = os::elapsedTime();
 882   double elapsed_time_ms = (end_time_sec - _mark_remark_start_sec)*1000.0;
 883   _concurrent_mark_remark_times_ms->add(elapsed_time_ms);
 884   _cur_mark_stop_world_time_ms += elapsed_time_ms;
 885   _prev_collection_pause_end_ms += elapsed_time_ms;
 886 
 887   _mmu_tracker->add_pause(_mark_remark_start_sec, end_time_sec);
 888 }
 889 
 890 void G1CollectorPolicy::record_concurrent_mark_cleanup_start() {
 891   _mark_cleanup_start_sec = os::elapsedTime();
 892 }
 893 
 894 void G1CollectorPolicy::record_concurrent_mark_cleanup_completed() {
 895   collector_state()->set_last_young_gc(true);


 896   collector_state()->set_in_marking_window(false);
 897 }
 898 
 899 void G1CollectorPolicy::record_concurrent_pause() {
 900   if (_stop_world_start > 0.0) {
 901     double yield_ms = (os::elapsedTime() - _stop_world_start) * 1000.0;
 902     _trace_young_gen_time_data.record_yield_time(yield_ms);
 903   }
 904 }
 905 
 906 double G1CollectorPolicy::average_time_ms(G1GCPhaseTimes::GCParPhases phase) const {
 907   return phase_times()->average_time_ms(phase);
 908 }
 909 
 910 double G1CollectorPolicy::young_other_time_ms() const {
 911   return phase_times()->young_cset_choice_time_ms() +
 912          phase_times()->young_free_cset_time_ms();
 913 }
 914 
 915 double G1CollectorPolicy::non_young_other_time_ms() const {




 875 void G1CollectorPolicy::record_concurrent_mark_remark_start() {
 876   _mark_remark_start_sec = os::elapsedTime();
 877   collector_state()->set_during_marking(false);
 878 }
 879 
 880 void G1CollectorPolicy::record_concurrent_mark_remark_end() {
 881   double end_time_sec = os::elapsedTime();
 882   double elapsed_time_ms = (end_time_sec - _mark_remark_start_sec)*1000.0;
 883   _concurrent_mark_remark_times_ms->add(elapsed_time_ms);
 884   _cur_mark_stop_world_time_ms += elapsed_time_ms;
 885   _prev_collection_pause_end_ms += elapsed_time_ms;
 886 
 887   _mmu_tracker->add_pause(_mark_remark_start_sec, end_time_sec);
 888 }
 889 
 890 void G1CollectorPolicy::record_concurrent_mark_cleanup_start() {
 891   _mark_cleanup_start_sec = os::elapsedTime();
 892 }
 893 
 894 void G1CollectorPolicy::record_concurrent_mark_cleanup_completed() {
 895   bool should_continue_with_reclaim = next_gc_should_be_mixed("request last young-only gc",
 896                                                               "skip last young-only gc");
 897   collector_state()->set_last_young_gc(should_continue_with_reclaim);
 898   collector_state()->set_in_marking_window(false);
 899 }
 900 
 901 void G1CollectorPolicy::record_concurrent_pause() {
 902   if (_stop_world_start > 0.0) {
 903     double yield_ms = (os::elapsedTime() - _stop_world_start) * 1000.0;
 904     _trace_young_gen_time_data.record_yield_time(yield_ms);
 905   }
 906 }
 907 
 908 double G1CollectorPolicy::average_time_ms(G1GCPhaseTimes::GCParPhases phase) const {
 909   return phase_times()->average_time_ms(phase);
 910 }
 911 
 912 double G1CollectorPolicy::young_other_time_ms() const {
 913   return phase_times()->young_cset_choice_time_ms() +
 914          phase_times()->young_free_cset_time_ms();
 915 }
 916 
 917 double G1CollectorPolicy::non_young_other_time_ms() const {


< prev index next >