Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8253232: G1Analytics::compute_pause_time_ratios() uses wrong pause ti…
…mes in calculation

Reviewed-by: tschatzl, kbarrett
  • Loading branch information
Ivan Walulya authored and Thomas Schatzl committed Sep 17, 2020
1 parent 53a4ef2 commit 4ac6934965aa08f8a1ee5863e55266f59cfb6cdb
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/hotspot/share/gc/g1/g1Analytics.cpp
@@ -151,7 +151,8 @@ void G1Analytics::report_alloc_rate_ms(double alloc_rate) {

void G1Analytics::compute_pause_time_ratios(double end_time_sec, double pause_time_ms) {
double long_interval_ms = (end_time_sec - oldest_known_gc_end_time_sec()) * 1000.0;
_long_term_pause_time_ratio = _recent_gc_times_ms->sum() / long_interval_ms;
double gc_pause_time_ms = _recent_gc_times_ms->sum() - _recent_gc_times_ms->oldest() + pause_time_ms;
_long_term_pause_time_ratio = gc_pause_time_ms / long_interval_ms;
_long_term_pause_time_ratio = clamp(_long_term_pause_time_ratio, 0.0, 1.0);

double short_interval_ms = (end_time_sec - most_recent_gc_end_time_sec()) * 1000.0;

0 comments on commit 4ac6934

Please sign in to comment.