In G1Analytics::compute_pause_time_ratio() there is this code:
if (_recent_avg_pause_time_ratio < 0.0 ||
(_recent_avg_pause_time_ratio - 1.0 > 0.0)) {
// Clip ratio between 0.0 and 1.0, and continue. This will be fixed in
// CR 6902692 by redoing the manner in which the ratio is incrementally computed.
if (_recent_avg_pause_time_ratio < 0.0) {
_recent_avg_pause_time_ratio = 0.0;
} else {
assert(_recent_avg_pause_time_ratio - 1.0 > 0.0, "Ctl-point invariant");
_recent_avg_pause_time_ratio = 1.0;
}
}
that could be simplified using MIN/MAX methods or the clamp() method introduced byJDK-8233702
if (_recent_avg_pause_time_ratio < 0.0 ||
(_recent_avg_pause_time_ratio - 1.0 > 0.0)) {
// Clip ratio between 0.0 and 1.0, and continue. This will be fixed in
// CR 6902692 by redoing the manner in which the ratio is incrementally computed.
if (_recent_avg_pause_time_ratio < 0.0) {
_recent_avg_pause_time_ratio = 0.0;
} else {
assert(_recent_avg_pause_time_ratio - 1.0 > 0.0, "Ctl-point invariant");
_recent_avg_pause_time_ratio = 1.0;
}
}
that could be simplified using MIN/MAX methods or the clamp() method introduced by
- is blocked by
-
JDK-8233702 Introduce helper function to clamp value to range
-
- Resolved
-
- relates to
-
JDK-6902692 G1: g1CollectorPolicy.cpp:1533, assert(false,"Debugging data for CR 6898948 has been dumped above")
-
- Closed
-