mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8366145: G1: Help diagnose ubsan division by zero in computing pause time ratios (g1Analytics.cpp)
Reviewed-by: tschatzl, kbarrett
This commit is contained in:
parent
a5a2340054
commit
b0f5b23ed2
@ -181,6 +181,7 @@ void G1Analytics::update_gc_time_ratios(double end_time_sec, double pause_time_m
|
||||
|
||||
double short_interval_ms = (end_time_sec - most_recent_gc_end_time_sec()) * 1000.0;
|
||||
|
||||
assert(short_interval_ms != 0.0, "short_interval_ms should not be zero, calculated from %f and %f", end_time_sec, most_recent_gc_end_time_sec());
|
||||
_short_term_gc_time_ratio = gc_time_ms / short_interval_ms;
|
||||
_short_term_gc_time_ratio = clamp(_short_term_gc_time_ratio, 0.0, 1.0);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user