Skip to content

Commit f1cc890

Browse files
author
Thomas Schatzl
committed
8343086: [BACKOUT] JDK-8295269 G1: Improve slow startup due to predictor initialization
Reviewed-by: sangheki
1 parent 36d7173 commit f1cc890

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/hotspot/share/gc/g1/g1AnalyticsSequences.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class G1Predictions;
3535
// Container for TruncatedSeqs that need separate predictors by GC phase.
3636
class G1PhaseDependentSeq {
3737
TruncatedSeq _young_only_seq;
38-
double _initial_value;
3938
TruncatedSeq _mixed_seq;
4039

4140
NONCOPYABLE(G1PhaseDependentSeq);

src/hotspot/share/gc/g1/g1AnalyticsSequences.inline.hpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ bool G1PhaseDependentSeq::enough_samples_to_use_mixed_seq() const {
3434

3535
G1PhaseDependentSeq::G1PhaseDependentSeq(int length) :
3636
_young_only_seq(length),
37-
_initial_value(0.0),
3837
_mixed_seq(length)
3938
{ }
4039

@@ -43,7 +42,7 @@ TruncatedSeq* G1PhaseDependentSeq::seq_raw(bool use_young_only_phase_seq) {
4342
}
4443

4544
void G1PhaseDependentSeq::set_initial(double value) {
46-
_initial_value = value;
45+
_young_only_seq.add(value);
4746
}
4847

4948
void G1PhaseDependentSeq::add(double value, bool for_young_only_phase) {
@@ -52,12 +51,8 @@ void G1PhaseDependentSeq::add(double value, bool for_young_only_phase) {
5251

5352
double G1PhaseDependentSeq::predict(const G1Predictions* predictor, bool use_young_only_phase_seq) const {
5453
if (use_young_only_phase_seq || !enough_samples_to_use_mixed_seq()) {
55-
if (_young_only_seq.num() == 0) {
56-
return _initial_value;
57-
}
5854
return predictor->predict(&_young_only_seq);
5955
} else {
60-
assert(_mixed_seq.num() > 0, "must not ask this with no samples");
6156
return predictor->predict(&_mixed_seq);
6257
}
6358
}

0 commit comments

Comments
 (0)