src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-gc-g1-logging-remove-serial Sdiff src/share/vm/gc_implementation/g1

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

Print this page
rev 3484 : 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
Summary: Introduced the WorkerDataArray class.
Reviewed-by: mgerdin


  62   }
  63 #endif
  64 
  65   void append(const char* format, ...) {
  66     va_list ap;
  67     va_start(ap, format);
  68     vappend(format, ap);
  69     va_end(ap);
  70   }
  71 
  72   void append_and_print_cr(const char* format, ...) {
  73     va_list ap;
  74     va_start(ap, format);
  75     vappend(format, ap);
  76     va_end(ap);
  77     gclog_or_tty->print_cr("%s", _buffer);
  78     _cur = _indent_level * INDENT_CHARS;
  79   }
  80 };
  81 




































































  82 G1GCPhaseTimes::G1GCPhaseTimes(uint max_gc_threads) :
  83   _max_gc_threads(max_gc_threads),
  84   _min_clear_cc_time_ms(-1.0),
  85   _max_clear_cc_time_ms(-1.0),
  86   _cur_clear_cc_time_ms(0.0),
  87   _cum_clear_cc_time_ms(0.0),
  88   _num_cc_clears(0L)












  89 {
  90   assert(max_gc_threads > 0, "Must have some GC threads");
  91   _par_last_gc_worker_start_times_ms = new double[_max_gc_threads];
  92   _par_last_ext_root_scan_times_ms = new double[_max_gc_threads];
  93   _par_last_satb_filtering_times_ms = new double[_max_gc_threads];
  94   _par_last_update_rs_times_ms = new double[_max_gc_threads];
  95   _par_last_update_rs_processed_buffers = new double[_max_gc_threads];
  96   _par_last_scan_rs_times_ms = new double[_max_gc_threads];
  97   _par_last_obj_copy_times_ms = new double[_max_gc_threads];
  98   _par_last_termination_times_ms = new double[_max_gc_threads];
  99   _par_last_termination_attempts = new double[_max_gc_threads];
 100   _par_last_gc_worker_end_times_ms = new double[_max_gc_threads];
 101   _par_last_gc_worker_times_ms = new double[_max_gc_threads];
 102   _par_last_gc_worker_other_times_ms = new double[_max_gc_threads];
 103 }
 104 
 105 void G1GCPhaseTimes::note_gc_start(double pause_start_time_sec, uint active_gc_threads,
 106   bool is_young_gc, bool is_initial_mark_gc, GCCause::Cause gc_cause) {
 107   assert(active_gc_threads > 0, "The number of threads must be > 0");
 108   assert(active_gc_threads <= _max_gc_threads, "The number of active threads must be <= the max nubmer of threads");
 109   _active_gc_threads = active_gc_threads;
 110   _pause_start_time_sec = pause_start_time_sec;
 111   _is_young_gc = is_young_gc;
 112   _is_initial_mark_gc = is_initial_mark_gc;
 113   _gc_cause = gc_cause;
 114 
 115 #ifdef ASSERT
 116   // initialise the timing data to something well known so that we can spot
 117   // if something is not set properly
 118 
 119   for (uint i = 0; i < _max_gc_threads; ++i) {
 120     _par_last_gc_worker_start_times_ms[i] = -1234.0;
 121     _par_last_ext_root_scan_times_ms[i] = -1234.0;
 122     _par_last_satb_filtering_times_ms[i] = -1234.0;
 123     _par_last_update_rs_times_ms[i] = -1234.0;
 124     _par_last_update_rs_processed_buffers[i] = -1234.0;
 125     _par_last_scan_rs_times_ms[i] = -1234.0;
 126     _par_last_obj_copy_times_ms[i] = -1234.0;
 127     _par_last_termination_times_ms[i] = -1234.0;
 128     _par_last_termination_attempts[i] = -1234.0;
 129     _par_last_gc_worker_end_times_ms[i] = -1234.0;
 130     _par_last_gc_worker_times_ms[i] = -1234.0;
 131     _par_last_gc_worker_other_times_ms[i] = -1234.0;
 132   }
 133 #endif
 134 }
 135 
 136 void G1GCPhaseTimes::note_gc_end(double pause_end_time_sec) {











 137   if (G1Log::fine()) {
 138     double pause_time_ms = (pause_end_time_sec - _pause_start_time_sec) * MILLIUNITS;
 139 
 140     for (uint i = 0; i < _active_gc_threads; i++) {
 141       _par_last_gc_worker_times_ms[i] = _par_last_gc_worker_end_times_ms[i] -
 142         _par_last_gc_worker_start_times_ms[i];
 143 
 144       double worker_known_time = _par_last_ext_root_scan_times_ms[i] +
 145         _par_last_satb_filtering_times_ms[i] +
 146         _par_last_update_rs_times_ms[i] +
 147         _par_last_scan_rs_times_ms[i] +
 148         _par_last_obj_copy_times_ms[i] +
 149         _par_last_termination_times_ms[i];
 150 
 151       _par_last_gc_worker_other_times_ms[i] = _par_last_gc_worker_times_ms[i] -
 152         worker_known_time;
 153     }
 154 
 155     print(pause_time_ms);
 156   }
 157 
 158 }
 159 
 160 void G1GCPhaseTimes::print_par_stats(int level,
 161                                         const char* str,
 162                                         double* data,
 163                                         bool showDecimals) {
 164   double min = data[0], max = data[0];
 165   double total = 0.0;
 166   LineBuffer buf(level);
 167   buf.append("[%s (ms):", str);
 168   for (uint i = 0; i < _active_gc_threads; ++i) {
 169     double val = data[i];
 170     if (val < min)
 171       min = val;
 172     if (val > max)
 173       max = val;
 174     total += val;
 175     if (G1Log::finest()) {
 176       if (showDecimals) {
 177         buf.append("  %.1lf", val);
 178       } else {
 179         buf.append("  %d", (int)val);
 180       }
 181     }
 182   }
 183 
 184   if (G1Log::finest()) {
 185     buf.append_and_print_cr("");
 186   }
 187   double avg = total / (double) _active_gc_threads;
 188   if (showDecimals) {
 189     buf.append_and_print_cr(" Min: %.1lf, Avg: %.1lf, Max: %.1lf, Diff: %.1lf, Sum: %.1lf]",
 190       min, avg, max, max - min, total);
 191   } else {
 192     buf.append_and_print_cr(" Min: %d, Avg: %d, Max: %d, Diff: %d, Sum: %d]",
 193       (int)min, (int)avg, (int)max, (int)max - (int)min, (int)total);
 194   }
 195 }
 196 
 197 void G1GCPhaseTimes::print_stats(int level, const char* str, double value) {
 198   LineBuffer(level).append_and_print_cr("[%s: %.1lf ms]", str, value);
 199 }
 200 
 201 void G1GCPhaseTimes::print_stats(int level, const char* str, double value, int workers) {
 202   LineBuffer(level).append_and_print_cr("[%s: %.1lf ms, GC Workers: %d]", str, value, workers);
 203 }
 204 
 205 void G1GCPhaseTimes::print_stats(int level, const char* str, int value) {
 206   LineBuffer(level).append_and_print_cr("[%s: %d]", str, value);
 207 }
 208 
 209 double G1GCPhaseTimes::avg_value(double* data) {
 210   if (G1CollectedHeap::use_parallel_gc_threads()) {
 211     double ret = 0.0;
 212     for (uint i = 0; i < _active_gc_threads; ++i) {
 213       ret += data[i];
 214     }
 215     return ret / (double) _active_gc_threads;
 216   } else {
 217     return data[0];
 218   }
 219 }
 220 
 221 double G1GCPhaseTimes::max_value(double* data) {
 222   if (G1CollectedHeap::use_parallel_gc_threads()) {
 223     double ret = data[0];
 224     for (uint i = 1; i < _active_gc_threads; ++i) {
 225       if (data[i] > ret) {
 226         ret = data[i];
 227       }
 228     }
 229     return ret;
 230   } else {
 231     return data[0];
 232   }
 233 }
 234 
 235 double G1GCPhaseTimes::sum_of_values(double* data) {
 236   if (G1CollectedHeap::use_parallel_gc_threads()) {
 237     double sum = 0.0;
 238     for (uint i = 0; i < _active_gc_threads; i++) {
 239       sum += data[i];
 240     }
 241     return sum;
 242   } else {
 243     return data[0];
 244   }
 245 }
 246 
 247 double G1GCPhaseTimes::max_sum(double* data1, double* data2) {
 248   double ret = data1[0] + data2[0];
 249 
 250   if (G1CollectedHeap::use_parallel_gc_threads()) {
 251     for (uint i = 1; i < _active_gc_threads; ++i) {
 252       double data = data1[i] + data2[i];
 253       if (data > ret) {
 254         ret = data;
 255       }
 256     }
 257   }
 258   return ret;
 259 }
 260 
 261 void G1GCPhaseTimes::collapse_par_times() {
 262     _ext_root_scan_time = avg_value(_par_last_ext_root_scan_times_ms);
 263     _satb_filtering_time = avg_value(_par_last_satb_filtering_times_ms);
 264     _update_rs_time = avg_value(_par_last_update_rs_times_ms);
 265     _update_rs_processed_buffers =
 266       sum_of_values(_par_last_update_rs_processed_buffers);
 267     _scan_rs_time = avg_value(_par_last_scan_rs_times_ms);
 268     _obj_copy_time = avg_value(_par_last_obj_copy_times_ms);
 269     _termination_time = avg_value(_par_last_termination_times_ms);
 270 }
 271 
 272 double G1GCPhaseTimes::accounted_time_ms() {
 273     // Subtract the root region scanning wait time. It's initialized to
 274     // zero at the start of the pause.
 275     double misc_time_ms = _root_region_scan_wait_time_ms;
 276 
 277     misc_time_ms += _cur_collection_par_time_ms;
 278 
 279     // Now subtract the time taken to fix up roots in generated code
 280     misc_time_ms += _cur_collection_code_root_fixup_time_ms;
 281 
 282     // Subtract the time taken to clean the card table from the
 283     // current value of "other time"
 284     misc_time_ms += _cur_clear_ct_time_ms;
 285 
 286     return misc_time_ms;
 287 }
 288 
 289 void G1GCPhaseTimes::print(double pause_time_ms) {
 290 
 291   if (PrintGCTimeStamps) {
 292     gclog_or_tty->stamp();
 293     gclog_or_tty->print(": ");
 294   }
 295 
 296   GCCauseString gc_cause_str = GCCauseString("GC pause", _gc_cause)
 297     .append(_is_young_gc ? " (young)" : " (mixed)")
 298     .append(_is_initial_mark_gc ? " (initial-mark)" : "");
 299   gclog_or_tty->print_cr("[%s, %3.7f secs]", (const char*)gc_cause_str, pause_time_ms / 1000.0);
 300 
 301   if (!G1Log::finer()) {
 302     return;
 303   }
 304 
 305   if (_root_region_scan_wait_time_ms > 0.0) {
 306     print_stats(1, "Root Region Scan Waiting", _root_region_scan_wait_time_ms);
 307   }
 308   if (G1CollectedHeap::use_parallel_gc_threads()) {
 309     print_stats(1, "Parallel Time", _cur_collection_par_time_ms, _active_gc_threads);
 310     print_par_stats(2, "GC Worker Start", _par_last_gc_worker_start_times_ms);
 311     print_par_stats(2, "Ext Root Scanning", _par_last_ext_root_scan_times_ms);
 312     if (_satb_filtering_time > 0.0) {
 313       print_par_stats(2, "SATB Filtering", _par_last_satb_filtering_times_ms);
 314     }
 315     print_par_stats(2, "Update RS", _par_last_update_rs_times_ms);
 316     if (G1Log::finest()) {
 317       print_par_stats(3, "Processed Buffers", _par_last_update_rs_processed_buffers,
 318         false /* showDecimals */);
 319     }
 320     print_par_stats(2, "Scan RS", _par_last_scan_rs_times_ms);
 321     print_par_stats(2, "Object Copy", _par_last_obj_copy_times_ms);
 322     print_par_stats(2, "Termination", _par_last_termination_times_ms);
 323     if (G1Log::finest()) {
 324       print_par_stats(3, "Termination Attempts", _par_last_termination_attempts,
 325         false /* showDecimals */);
 326     }
 327     print_par_stats(2, "GC Worker Other", _par_last_gc_worker_other_times_ms);
 328     print_par_stats(2, "GC Worker Total", _par_last_gc_worker_times_ms);
 329     print_par_stats(2, "GC Worker End", _par_last_gc_worker_end_times_ms);
 330   } else {
 331     print_stats(1, "Ext Root Scanning", _ext_root_scan_time);
 332     if (_satb_filtering_time > 0.0) {
 333       print_stats(1, "SATB Filtering", _satb_filtering_time);
 334     }
 335     print_stats(1, "Update RS", _update_rs_time);
 336     if (G1Log::finest()) {
 337       print_stats(2, "Processed Buffers", (int)_update_rs_processed_buffers);
 338     }
 339     print_stats(1, "Scan RS", _scan_rs_time);
 340     print_stats(1, "Object Copying", _obj_copy_time);
 341   }
 342   print_stats(1, "Code Root Fixup", _cur_collection_code_root_fixup_time_ms);
 343   print_stats(1, "Clear CT", _cur_clear_ct_time_ms);
 344   if (Verbose && G1Log::finest()) {
 345     print_stats(1, "Cur Clear CC", _cur_clear_cc_time_ms);
 346     print_stats(1, "Cum Clear CC", _cum_clear_cc_time_ms);
 347     print_stats(1, "Min Clear CC", _min_clear_cc_time_ms);
 348     print_stats(1, "Max Clear CC", _max_clear_cc_time_ms);
 349     if (_num_cc_clears > 0) {
 350       print_stats(1, "Avg Clear CC", _cum_clear_cc_time_ms / ((double)_num_cc_clears));
 351     }
 352   }
 353   double misc_time_ms = pause_time_ms - accounted_time_ms();
 354   print_stats(1, "Other", misc_time_ms);
 355   print_stats(2, "Choose CSet",
 356     (_recorded_young_cset_choice_time_ms +
 357     _recorded_non_young_cset_choice_time_ms));
 358   print_stats(2, "Ref Proc", _cur_ref_proc_time_ms);
 359   print_stats(2, "Ref Enq", _cur_ref_enq_time_ms);
 360   print_stats(2, "Free CSet",


  62   }
  63 #endif
  64 
  65   void append(const char* format, ...) {
  66     va_list ap;
  67     va_start(ap, format);
  68     vappend(format, ap);
  69     va_end(ap);
  70   }
  71 
  72   void append_and_print_cr(const char* format, ...) {
  73     va_list ap;
  74     va_start(ap, format);
  75     vappend(format, ap);
  76     va_end(ap);
  77     gclog_or_tty->print_cr("%s", _buffer);
  78     _cur = _indent_level * INDENT_CHARS;
  79   }
  80 };
  81 
  82 template <class T>
  83 void WorkerDataArray<T>::print(int level, const char* title) {
  84   if (_length == 1) {
  85     // No need for min, max, average and sum for only one worker
  86     LineBuffer buf(level);
  87     buf.append("[%s:  ", title);
  88     buf.append(_print_format, _data[0]);
  89     buf.append_and_print_cr("]");
  90     return;
  91   }
  92 
  93   T min = _data[0];
  94   T max = _data[0];
  95   T sum = 0;
  96 
  97   LineBuffer buf(level);
  98   buf.append("[%s:", title);
  99   for (uint i = 0; i < _length; ++i) {
 100     T val = _data[i];
 101     min = MIN2(val, min);
 102     max = MAX2(val, max);
 103     sum += val;
 104     if (G1Log::finest()) {
 105       buf.append("  ");
 106       buf.append(_print_format, val);
 107     }
 108   }
 109 
 110   if (G1Log::finest()) {
 111     buf.append_and_print_cr("");
 112   }
 113 
 114   double avg = (double)sum / (double)_length;
 115   buf.append(" Min: ");
 116   buf.append(_print_format, min);
 117   buf.append(", Avg: ");
 118   buf.append("%.1lf", avg); // Always print average as a double
 119   buf.append(", Max: ");
 120   buf.append(_print_format, max);
 121   buf.append(", Diff: ");
 122   buf.append(_print_format, max - min);
 123   if (_print_sum) {
 124     // for things like the start and end times the sum is not
 125     // that relevant
 126     buf.append(", Sum: ");
 127     buf.append(_print_format, sum);
 128   }
 129   buf.append_and_print_cr("]");
 130 }
 131 
 132 #ifdef ASSERT
 133 
 134 template <class T>
 135 void WorkerDataArray<T>::reset() {
 136   for (uint i = 0; i < _length; i++) {
 137     _data[i] = (T)-1;
 138   }
 139 }
 140 
 141 template <class T>
 142 void WorkerDataArray<T>::verify() {
 143   for (uint i = 0; i < _length; i++) {
 144     assert(_data[i] >= (T)0, err_msg("Invalid data for worker %d", i));
 145   }
 146 }
 147 
 148 #endif
 149 
 150 G1GCPhaseTimes::G1GCPhaseTimes(uint max_gc_threads) :
 151   _max_gc_threads(max_gc_threads),
 152   _min_clear_cc_time_ms(-1.0),
 153   _max_clear_cc_time_ms(-1.0),
 154   _cur_clear_cc_time_ms(0.0),
 155   _cum_clear_cc_time_ms(0.0),
 156   _num_cc_clears(0L),
 157   _last_gc_worker_start_times_ms(_max_gc_threads, "%.1lf", false),
 158   _last_ext_root_scan_times_ms(_max_gc_threads, "%.1lf"),
 159   _last_satb_filtering_times_ms(_max_gc_threads, "%.1lf"),
 160   _last_update_rs_times_ms(_max_gc_threads, "%.1lf"),
 161   _last_update_rs_processed_buffers(_max_gc_threads, "%d"),
 162   _last_scan_rs_times_ms(_max_gc_threads, "%.1lf"),
 163   _last_obj_copy_times_ms(_max_gc_threads, "%.1lf"),
 164   _last_termination_times_ms(_max_gc_threads, "%.1lf"),
 165   _last_termination_attempts(_max_gc_threads, SIZE_FORMAT),
 166   _last_gc_worker_end_times_ms(_max_gc_threads, "%.1lf", false),
 167   _last_gc_worker_times_ms(_max_gc_threads, "%.1lf"),
 168   _last_gc_worker_other_times_ms(_max_gc_threads, "%.1lf")
 169 {
 170   assert(max_gc_threads > 0, "Must have some GC threads");












 171 }
 172 
 173 void G1GCPhaseTimes::note_gc_start(double pause_start_time_sec, uint active_gc_threads,
 174   bool is_young_gc, bool is_initial_mark_gc, GCCause::Cause gc_cause) {
 175   assert(active_gc_threads > 0, "The number of threads must be > 0");
 176   assert(active_gc_threads <= _max_gc_threads, "The number of active threads must be <= the max nubmer of threads");
 177   _active_gc_threads = active_gc_threads;
 178   _pause_start_time_sec = pause_start_time_sec;
 179   _is_young_gc = is_young_gc;
 180   _is_initial_mark_gc = is_initial_mark_gc;
 181   _gc_cause = gc_cause;
 182 
 183   _last_gc_worker_start_times_ms.reset();
 184   _last_ext_root_scan_times_ms.reset();
 185   _last_satb_filtering_times_ms.reset();
 186   _last_update_rs_times_ms.reset();
 187   _last_update_rs_processed_buffers.reset();
 188   _last_scan_rs_times_ms.reset();
 189   _last_obj_copy_times_ms.reset();
 190   _last_termination_times_ms.reset();
 191   _last_termination_attempts.reset();
 192   _last_gc_worker_end_times_ms.reset();
 193   _last_gc_worker_times_ms.reset();
 194   _last_gc_worker_other_times_ms.reset();







 195 }
 196 
 197 void G1GCPhaseTimes::note_gc_end(double pause_end_time_sec) {
 198   _last_gc_worker_start_times_ms.verify();
 199   _last_ext_root_scan_times_ms.verify();
 200   _last_satb_filtering_times_ms.verify();
 201   _last_update_rs_times_ms.verify();
 202   _last_update_rs_processed_buffers.verify();
 203   _last_scan_rs_times_ms.verify();
 204   _last_obj_copy_times_ms.verify();
 205   _last_termination_times_ms.verify();
 206   _last_termination_attempts.verify();
 207   _last_gc_worker_end_times_ms.verify();
 208 
 209   if (G1Log::fine()) {
 210     double pause_time_ms = (pause_end_time_sec - _pause_start_time_sec) * MILLIUNITS;
 211 
 212     for (uint i = 0; i < _active_gc_threads; i++) {
 213       _last_gc_worker_times_ms.set(i,
 214         _last_gc_worker_end_times_ms.get(i) - _last_gc_worker_start_times_ms.get(i));
 215 
 216       double worker_known_time = _last_ext_root_scan_times_ms.get(i) +
 217         _last_satb_filtering_times_ms.get(i) +
 218         _last_update_rs_times_ms.get(i) +
 219         _last_scan_rs_times_ms.get(i) +
 220         _last_obj_copy_times_ms.get(i) +
 221         _last_termination_times_ms.get(i);
 222 
 223       _last_gc_worker_other_times_ms.set(i,
 224         _last_gc_worker_times_ms.get(i) - worker_known_time);
 225     }
 226 
 227     _last_gc_worker_times_ms.verify();
 228     _last_gc_worker_other_times_ms.verify();
 229 
 230     print(pause_time_ms);























 231   }
 232 











 233 }
 234 
 235 void G1GCPhaseTimes::print_stats(int level, const char* str, double value) {
 236   LineBuffer(level).append_and_print_cr("[%s: %.1lf ms]", str, value);
 237 }
 238 
 239 void G1GCPhaseTimes::print_stats(int level, const char* str, double value, int workers) {
 240   LineBuffer(level).append_and_print_cr("[%s: %.1lf ms, GC Workers: %d]", str, value, workers);
 241 }
 242 



































































 243 double G1GCPhaseTimes::accounted_time_ms() {
 244     // Subtract the root region scanning wait time. It's initialized to
 245     // zero at the start of the pause.
 246     double misc_time_ms = _root_region_scan_wait_time_ms;
 247 
 248     misc_time_ms += _cur_collection_par_time_ms;
 249 
 250     // Now subtract the time taken to fix up roots in generated code
 251     misc_time_ms += _cur_collection_code_root_fixup_time_ms;
 252 
 253     // Subtract the time taken to clean the card table from the
 254     // current value of "other time"
 255     misc_time_ms += _cur_clear_ct_time_ms;
 256 
 257     return misc_time_ms;
 258 }
 259 
 260 void G1GCPhaseTimes::print(double pause_time_ms) {
 261 
 262   if (PrintGCTimeStamps) {
 263     gclog_or_tty->stamp();
 264     gclog_or_tty->print(": ");
 265   }
 266 
 267   GCCauseString gc_cause_str = GCCauseString("GC pause", _gc_cause)
 268     .append(_is_young_gc ? " (young)" : " (mixed)")
 269     .append(_is_initial_mark_gc ? " (initial-mark)" : "");
 270   gclog_or_tty->print_cr("[%s, %3.7f secs]", (const char*)gc_cause_str, pause_time_ms / 1000.0);
 271 
 272   if (!G1Log::finer()) {
 273     return;
 274   }
 275 
 276   if (_root_region_scan_wait_time_ms > 0.0) {
 277     print_stats(1, "Root Region Scan Waiting", _root_region_scan_wait_time_ms);
 278   }
 279   if (G1CollectedHeap::use_parallel_gc_threads()) {
 280     print_stats(1, "Parallel Time", _cur_collection_par_time_ms, _active_gc_threads);
 281     _last_gc_worker_start_times_ms.print(2, "GC Worker Start (ms)");
 282     _last_ext_root_scan_times_ms.print(2, "Ext Root Scanning (ms)");
 283     if (_last_satb_filtering_times_ms.sum() > 0.0) {
 284       _last_satb_filtering_times_ms.print(2, "SATB Filtering (ms)");
 285     }
 286     _last_update_rs_times_ms.print(2, "Update RS (ms)");
 287     if (G1Log::finest()) {
 288       _last_update_rs_processed_buffers.print(3, "Processed Buffers");

 289     }
 290     _last_scan_rs_times_ms.print(2, "Scan RS (ms)");
 291     _last_obj_copy_times_ms.print(2, "Object Copy (ms)");
 292     _last_termination_times_ms.print(2, "Termination (ms)");
 293     if (G1Log::finest()) {
 294       _last_termination_attempts.print(3, "Termination Attempts");

 295     }
 296     _last_gc_worker_other_times_ms.print(2, "GC Worker Other (ms)");
 297     _last_gc_worker_times_ms.print(2, "GC Worker Total (ms)");
 298     _last_gc_worker_end_times_ms.print(2, "GC Worker End (ms)");
 299   } else {
 300     _last_ext_root_scan_times_ms.print(1, "Ext Root Scanning (ms)");
 301     if (_last_satb_filtering_times_ms.sum() > 0.0) {
 302       _last_satb_filtering_times_ms.print(1, "SATB Filtering (ms)");
 303     }
 304     _last_update_rs_times_ms.print(1, "Update RS (ms)");
 305     if (G1Log::finest()) {
 306       _last_update_rs_processed_buffers.print(2, "Processed Buffers");
 307     }
 308     _last_scan_rs_times_ms.print(1, "Scan RS (ms)");
 309     _last_obj_copy_times_ms.print(1, "Object Copy (ms)");
 310   }
 311   print_stats(1, "Code Root Fixup", _cur_collection_code_root_fixup_time_ms);
 312   print_stats(1, "Clear CT", _cur_clear_ct_time_ms);
 313   if (Verbose && G1Log::finest()) {
 314     print_stats(1, "Cur Clear CC", _cur_clear_cc_time_ms);
 315     print_stats(1, "Cum Clear CC", _cum_clear_cc_time_ms);
 316     print_stats(1, "Min Clear CC", _min_clear_cc_time_ms);
 317     print_stats(1, "Max Clear CC", _max_clear_cc_time_ms);
 318     if (_num_cc_clears > 0) {
 319       print_stats(1, "Avg Clear CC", _cum_clear_cc_time_ms / ((double)_num_cc_clears));
 320     }
 321   }
 322   double misc_time_ms = pause_time_ms - accounted_time_ms();
 323   print_stats(1, "Other", misc_time_ms);
 324   print_stats(2, "Choose CSet",
 325     (_recorded_young_cset_choice_time_ms +
 326     _recorded_non_young_cset_choice_time_ms));
 327   print_stats(2, "Ref Proc", _cur_ref_proc_time_ms);
 328   print_stats(2, "Ref Enq", _cur_ref_enq_time_ms);
 329   print_stats(2, "Free CSet",
src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File