Skip to content

Commit 73e1780

Browse files
author
Thomas Schatzl
committed
8349836: G1: Improve group prediction log message
Reviewed-by: ayang, iwalulya
1 parent ed17c55 commit 73e1780

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/hotspot/share/gc/g1/g1CollectionSetCandidates.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,23 @@ double G1CSetCandidateGroup::predict_group_total_time_ms() const {
102102
double merge_scan_time_ms = p->predict_merge_scan_time(card_rs_length);
103103
double non_young_other_time_ms = p->predict_non_young_other_time_ms(length());
104104

105-
log_trace(gc, ergo, cset) ("Prediction for group with %u regions, card_rs_length %zu, merge_scan_time %.2fms, code_root_scan_time_ms %.2fms, evac_time_ms %.2fms, other_time %.2fms, bytes_to_cop %zu",
105+
double total_time_ms = merge_scan_time_ms +
106+
predict_code_root_scan_time_ms +
107+
predicted_copy_time_ms +
108+
non_young_other_time_ms;
109+
110+
log_trace(gc, ergo, cset) ("Prediction for group %u (%u regions): total_time %.2fms card_rs_length %zu merge_scan_time %.2fms code_root_scan_time_ms %.2fms evac_time_ms %.2fms other_time %.2fms bytes_to_copy %zu",
111+
group_id(),
106112
length(),
113+
total_time_ms,
107114
card_rs_length,
108115
merge_scan_time_ms,
109116
predict_code_root_scan_time_ms,
110117
predicted_copy_time_ms,
111118
non_young_other_time_ms,
112119
predict_bytes_to_copy);
113120

114-
return merge_scan_time_ms +
115-
predict_code_root_scan_time_ms +
116-
predicted_copy_time_ms +
117-
non_young_other_time_ms;
121+
return total_time_ms;
118122
}
119123

120124
int G1CSetCandidateGroup::compare_gc_efficiency(G1CSetCandidateGroup** gr1, G1CSetCandidateGroup** gr2) {

0 commit comments

Comments
 (0)