1514 |
1514 |
1515 double interval_ms = |
1515 double interval_ms = |
1516 (end_time_sec - _recent_prev_end_times_for_all_gcs_sec->oldest()) * 1000.0; |
1516 (end_time_sec - _recent_prev_end_times_for_all_gcs_sec->oldest()) * 1000.0; |
1517 update_recent_gc_times(end_time_sec, elapsed_ms); |
1517 update_recent_gc_times(end_time_sec, elapsed_ms); |
1518 _recent_avg_pause_time_ratio = _recent_gc_times_ms->sum()/interval_ms; |
1518 _recent_avg_pause_time_ratio = _recent_gc_times_ms->sum()/interval_ms; |
1519 // using 1.01 to account for floating point inaccuracies |
1519 if (recent_avg_pause_time_ratio() < 0.0 || |
1520 assert(recent_avg_pause_time_ratio() < 1.01, "All GC?"); |
1520 (recent_avg_pause_time_ratio() - 1.0 > 0.0)) { |
|
1521 #ifndef PRODUCT |
|
1522 // Dump info to allow post-facto debugging |
|
1523 gclog_or_tty->print_cr("recent_avg_pause_time_ratio() out of bounds"); |
|
1524 gclog_or_tty->print_cr("-------------------------------------------"); |
|
1525 gclog_or_tty->print_cr("Recent GC Times (ms):"); |
|
1526 _recent_gc_times_ms->dump(); |
|
1527 gclog_or_tty->print_cr("(End Time=%3.3f) Recent GC End Times (s):", end_time_sec); |
|
1528 _recent_prev_end_times_for_all_gcs_sec->dump(); |
|
1529 gclog_or_tty->print_cr("GC = %3.3f, Interval = %3.3f, Ratio = %3.3f", |
|
1530 _recent_gc_times_ms->sum(), interval_ms, recent_avg_pause_time_ratio()); |
|
1531 // TEMPORARY: In debug mode, terminate the JVM, so nightly testing explicitly |
|
1532 // flags the sighting by failing the test. |
|
1533 assert(false, "Debugging data for CR 6898948 has been dumped above"); |
|
1534 #else // PRODUCT |
|
1535 // Clip ratio between 0.0 and 1.0 |
|
1536 if (_recent_avg_pause_time_ratio < 0.0) { |
|
1537 _recent_avg_pause_time_ratio = 0.0; |
|
1538 } else { |
|
1539 assert(_recent_avg_pause_time_ratio - 1.0 > 0.0, "Ctl-point invariant"); |
|
1540 _recent_avg_pause_time_ratio = 1.0; |
|
1541 } |
|
1542 #endif // PRODUCT |
|
1543 } |
1521 } |
1544 } |
1522 |
1545 |
1523 if (G1PolicyVerbose > 1) { |
1546 if (G1PolicyVerbose > 1) { |
1524 gclog_or_tty->print_cr(" Recording collection pause(%d)", _n_pauses); |
1547 gclog_or_tty->print_cr(" Recording collection pause(%d)", _n_pauses); |
1525 } |
1548 } |