8343086: [BACKOUT] JDK-8295269 G1: Improve slow startup due to predictor initialization

Reviewed-by: sangheki
This commit is contained in:
Thomas Schatzl 2024-10-25 19:17:42 +00:00
parent 36d71735e3
commit f1cc890ddf
2 changed files with 1 additions and 7 deletions

View File

@ -35,7 +35,6 @@ class G1Predictions;
// Container for TruncatedSeqs that need separate predictors by GC phase.
class G1PhaseDependentSeq {
TruncatedSeq _young_only_seq;
double _initial_value;
TruncatedSeq _mixed_seq;
NONCOPYABLE(G1PhaseDependentSeq);

View File

@ -34,7 +34,6 @@ bool G1PhaseDependentSeq::enough_samples_to_use_mixed_seq() const {
G1PhaseDependentSeq::G1PhaseDependentSeq(int length) :
_young_only_seq(length),
_initial_value(0.0),
_mixed_seq(length)
{ }
@ -43,7 +42,7 @@ TruncatedSeq* G1PhaseDependentSeq::seq_raw(bool use_young_only_phase_seq) {
}
void G1PhaseDependentSeq::set_initial(double value) {
_initial_value = value;
_young_only_seq.add(value);
}
void G1PhaseDependentSeq::add(double value, bool for_young_only_phase) {
@ -52,12 +51,8 @@ void G1PhaseDependentSeq::add(double value, bool for_young_only_phase) {
double G1PhaseDependentSeq::predict(const G1Predictions* predictor, bool use_young_only_phase_seq) const {
if (use_young_only_phase_seq || !enough_samples_to_use_mixed_seq()) {
if (_young_only_seq.num() == 0) {
return _initial_value;
}
return predictor->predict(&_young_only_seq);
} else {
assert(_mixed_seq.num() > 0, "must not ask this with no samples");
return predictor->predict(&_mixed_seq);
}
}