# HG changeset patch # User tonyp # Date 1256322867 14400 # Node ID 17ac574bab55bdbd4ba8bd6d3bbbc373192ec014 # Parent b4c91a37edead0745075bdea61ae3de608b230d3 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 diff -r b4c91a37edea -r 17ac574bab55 hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Thu Oct 22 07:43:49 2009 -0700 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Fri Oct 23 14:34:27 2009 -0400 @@ -1516,7 +1516,8 @@ (end_time_sec - _recent_prev_end_times_for_all_gcs_sec->oldest()) * 1000.0; update_recent_gc_times(end_time_sec, elapsed_ms); _recent_avg_pause_time_ratio = _recent_gc_times_ms->sum()/interval_ms; - assert(recent_avg_pause_time_ratio() < 1.00, "All GC?"); + // using 1.01 to account for floating point inaccuracies + assert(recent_avg_pause_time_ratio() < 1.01, "All GC?"); } if (G1PolicyVerbose > 1) {