Fri, 23 Oct 2009 14:34:27 -0400
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
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Thu Oct 22 07:43:49 2009 -0700 1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Fri Oct 23 14:34:27 2009 -0400 1.3 @@ -1516,7 +1516,8 @@ 1.4 (end_time_sec - _recent_prev_end_times_for_all_gcs_sec->oldest()) * 1000.0; 1.5 update_recent_gc_times(end_time_sec, elapsed_ms); 1.6 _recent_avg_pause_time_ratio = _recent_gc_times_ms->sum()/interval_ms; 1.7 - assert(recent_avg_pause_time_ratio() < 1.00, "All GC?"); 1.8 + // using 1.01 to account for floating point inaccuracies 1.9 + assert(recent_avg_pause_time_ratio() < 1.01, "All GC?"); 1.10 } 1.11 1.12 if (G1PolicyVerbose > 1) {