comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 1043:fc06cd9b42c7

6886024: G1: assert(recent_avg_pause_time_ratio() < 1.00,"All GC?") Summary: the assert is incorrect and can fire incorrectly due to floating point inaccuracy. Reviewed-by: apetrusenko, ysr, jcoomes
author tonyp
date Fri, 23 Oct 2009 14:34:27 -0400
parents 2c79770d1f6e
children 89f1b9ae8991
comparison
equal deleted inserted replaced
1030:dfdaf65c3423 1043:fc06cd9b42c7
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 assert(recent_avg_pause_time_ratio() < 1.00, "All GC?"); 1519 // using 1.01 to account for floating point inaccuracies
1520 assert(recent_avg_pause_time_ratio() < 1.01, "All GC?");
1520 } 1521 }
1521 1522
1522 if (G1PolicyVerbose > 1) { 1523 if (G1PolicyVerbose > 1) {
1523 gclog_or_tty->print_cr(" Recording collection pause(%d)", _n_pauses); 1524 gclog_or_tty->print_cr(" Recording collection pause(%d)", _n_pauses);
1524 } 1525 }