Skip to content

Commit 312985e

Browse files
Thomas SchatzlIvan Walulya
Thomas Schatzl
and
Ivan Walulya
committed
8295156: G1: Improve constant other time calculation
Co-authored-by: Ivan Walulya <iwalulya@openjdk.org> Reviewed-by: kbarrett, iwalulya
1 parent 786ce1c commit 312985e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Diff for: src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,10 @@ class G1GCPhaseTimes : public CHeapObj<mtGC> {
390390
}
391391

392392
double cur_collection_par_time_ms() {
393-
return _cur_collection_initial_evac_time_ms + _cur_optional_evac_time_ms;
393+
return _cur_collection_initial_evac_time_ms +
394+
_cur_optional_evac_time_ms +
395+
_cur_merge_heap_roots_time_ms +
396+
_cur_optional_merge_heap_roots_time_ms;
394397
}
395398

396399
double cur_expand_heap_time_ms() {

Diff for: src/hotspot/share/gc/g1/g1Policy.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ double G1Policy::other_time_ms(double pause_time_ms) const {
685685
}
686686

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

691691
bool G1Policy::about_to_start_mixed_phase() const {

0 commit comments

Comments
 (0)