Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 4ac6934
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hotspot/share/gc/g1/g1Analytics.cpp
Expand Up @@ -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;
Expand Down

1 comment on commit 4ac6934

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on 4ac6934 Sep 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.