Skip to content

Commit

Permalink
8295156: G1: Improve constant other time calculation
Browse files Browse the repository at this point in the history
Co-authored-by: Ivan Walulya <iwalulya@openjdk.org>
Reviewed-by: kbarrett, iwalulya
  • Loading branch information
Thomas Schatzl and Ivan Walulya committed Oct 14, 2022
1 parent 786ce1c commit 312985e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp
Expand Up @@ -390,7 +390,10 @@ class G1GCPhaseTimes : public CHeapObj<mtGC> {
}

double cur_collection_par_time_ms() {
return _cur_collection_initial_evac_time_ms + _cur_optional_evac_time_ms;
return _cur_collection_initial_evac_time_ms +
_cur_optional_evac_time_ms +
_cur_merge_heap_roots_time_ms +
_cur_optional_merge_heap_roots_time_ms;
}

double cur_expand_heap_time_ms() {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/g1/g1Policy.cpp
Expand Up @@ -685,7 +685,7 @@ double G1Policy::other_time_ms(double pause_time_ms) const {
}

double G1Policy::constant_other_time_ms(double pause_time_ms) const {
return other_time_ms(pause_time_ms) - phase_times()->total_rebuild_freelist_time_ms();
return other_time_ms(pause_time_ms) - (young_other_time_ms() + non_young_other_time_ms());
}

bool G1Policy::about_to_start_mixed_phase() const {
Expand Down

0 comments on commit 312985e

Please sign in to comment.