src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
changeset 57663 bf8e76d86d05
parent 55498 e64383344f14
child 58002 01d31583f25c
equal deleted inserted replaced
57662:f81dbe27a7b1 57663:bf8e76d86d05
  2585   // steal work from the other G1CMTasks. It only makes sense to
  2585   // steal work from the other G1CMTasks. It only makes sense to
  2586   // enable stealing when the termination protocol is enabled
  2586   // enable stealing when the termination protocol is enabled
  2587   // and do_marking_step() is not being called serially.
  2587   // and do_marking_step() is not being called serially.
  2588   bool do_stealing = do_termination && !is_serial;
  2588   bool do_stealing = do_termination && !is_serial;
  2589 
  2589 
  2590   double diff_prediction_ms = _g1h->policy()->predictor().get_new_prediction(&_marking_step_diffs_ms);
  2590   double diff_prediction_ms = _g1h->policy()->predictor().get_new_prediction(&_marking_step_diff_ms);
  2591   _time_target_ms = time_target_ms - diff_prediction_ms;
  2591   _time_target_ms = time_target_ms - diff_prediction_ms;
  2592 
  2592 
  2593   // set up the variables that are used in the work-based scheme to
  2593   // set up the variables that are used in the work-based scheme to
  2594   // call the regular clock method
  2594   // call the regular clock method
  2595   _words_scanned = 0;
  2595   _words_scanned = 0;
  2827     if (_has_timed_out) {
  2827     if (_has_timed_out) {
  2828       double diff_ms = elapsed_time_ms - _time_target_ms;
  2828       double diff_ms = elapsed_time_ms - _time_target_ms;
  2829       // Keep statistics of how well we did with respect to hitting
  2829       // Keep statistics of how well we did with respect to hitting
  2830       // our target only if we actually timed out (if we aborted for
  2830       // our target only if we actually timed out (if we aborted for
  2831       // other reasons, then the results might get skewed).
  2831       // other reasons, then the results might get skewed).
  2832       _marking_step_diffs_ms.add(diff_ms);
  2832       _marking_step_diff_ms.add(diff_ms);
  2833     }
  2833     }
  2834 
  2834 
  2835     if (_cm->has_overflown()) {
  2835     if (_cm->has_overflown()) {
  2836       // This is the interesting one. We aborted because a global
  2836       // This is the interesting one. We aborted because a global
  2837       // overflow was raised. This means we have to restart the
  2837       // overflow was raised. This means we have to restart the
  2910   _draining_satb_buffers(false),
  2910   _draining_satb_buffers(false),
  2911   _step_times_ms(),
  2911   _step_times_ms(),
  2912   _elapsed_time_ms(0.0),
  2912   _elapsed_time_ms(0.0),
  2913   _termination_time_ms(0.0),
  2913   _termination_time_ms(0.0),
  2914   _termination_start_time_ms(0.0),
  2914   _termination_start_time_ms(0.0),
  2915   _marking_step_diffs_ms()
  2915   _marking_step_diff_ms()
  2916 {
  2916 {
  2917   guarantee(task_queue != NULL, "invariant");
  2917   guarantee(task_queue != NULL, "invariant");
  2918 
  2918 
  2919   _marking_step_diffs_ms.add(0.5);
  2919   _marking_step_diff_ms.add(0.5);
  2920 }
  2920 }
  2921 
  2921 
  2922 // These are formatting macros that are used below to ensure
  2922 // These are formatting macros that are used below to ensure
  2923 // consistent formatting. The *_H_* versions are used to format the
  2923 // consistent formatting. The *_H_* versions are used to format the
  2924 // header for a particular value and they should be kept consistent
  2924 // header for a particular value and they should be kept consistent