author | tschatzl |
Wed, 18 Apr 2018 11:36:48 +0200 | |
changeset 49806 | 2d62570a615c |
parent 49643 | a3453bbd5418 |
child 51332 | c25572739e7c |
permissions | -rw-r--r-- |
1374 | 1 |
/* |
49643
a3453bbd5418
8199742: Clean up state flags in G1CollectorState
tschatzl
parents:
48010
diff
changeset
|
2 |
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. |
1374 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5350
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5350
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5350
diff
changeset
|
21 |
* questions. |
1374 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#include "precompiled.hpp" |
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
26 |
#include "gc/g1/g1Analytics.hpp" |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
27 |
#include "gc/g1/g1Predictions.hpp" |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
28 |
#include "runtime/os.hpp" |
7397 | 29 |
#include "utilities/debug.hpp" |
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
30 |
#include "utilities/numberSeq.hpp" |
1374 | 31 |
|
32 |
// Different defaults for different number of GC threads |
|
33 |
// They were chosen by running GCOld and SPECjbb on debris with different |
|
34 |
// numbers of GC threads and choosing them based on the results |
|
35 |
||
36 |
// all the same |
|
37 |
static double rs_length_diff_defaults[] = { |
|
38 |
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 |
|
39 |
}; |
|
40 |
||
41 |
static double cost_per_card_ms_defaults[] = { |
|
42 |
0.01, 0.005, 0.005, 0.003, 0.003, 0.002, 0.002, 0.0015 |
|
43 |
}; |
|
44 |
||
45 |
// all the same |
|
11249 | 46 |
static double young_cards_per_entry_ratio_defaults[] = { |
1374 | 47 |
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 |
48 |
}; |
|
49 |
||
50 |
static double cost_per_entry_ms_defaults[] = { |
|
51 |
0.015, 0.01, 0.01, 0.008, 0.008, 0.0055, 0.0055, 0.005 |
|
52 |
}; |
|
53 |
||
54 |
static double cost_per_byte_ms_defaults[] = { |
|
55 |
0.00006, 0.00003, 0.00003, 0.000015, 0.000015, 0.00001, 0.00001, 0.000009 |
|
56 |
}; |
|
57 |
||
58 |
// these should be pretty consistent |
|
59 |
static double constant_other_time_ms_defaults[] = { |
|
60 |
5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0 |
|
61 |
}; |
|
62 |
||
63 |
||
64 |
static double young_other_cost_per_region_ms_defaults[] = { |
|
65 |
0.3, 0.2, 0.2, 0.15, 0.15, 0.12, 0.12, 0.1 |
|
66 |
}; |
|
67 |
||
68 |
static double non_young_other_cost_per_region_ms_defaults[] = { |
|
69 |
1.0, 0.7, 0.7, 0.5, 0.5, 0.42, 0.42, 0.30 |
|
70 |
}; |
|
71 |
||
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
72 |
G1Analytics::G1Analytics(const G1Predictions* predictor) : |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
73 |
_predictor(predictor), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
74 |
_recent_gc_times_ms(new TruncatedSeq(NumPrevPausesForHeuristics)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
75 |
_concurrent_mark_remark_times_ms(new TruncatedSeq(NumPrevPausesForHeuristics)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
76 |
_concurrent_mark_cleanup_times_ms(new TruncatedSeq(NumPrevPausesForHeuristics)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
77 |
_alloc_rate_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
78 |
_prev_collection_pause_end_ms(0.0), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
79 |
_rs_length_diff_seq(new TruncatedSeq(TruncatedSeqLength)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
80 |
_cost_per_card_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
81 |
_cost_scan_hcc_seq(new TruncatedSeq(TruncatedSeqLength)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
82 |
_young_cards_per_entry_ratio_seq(new TruncatedSeq(TruncatedSeqLength)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
83 |
_mixed_cards_per_entry_ratio_seq(new TruncatedSeq(TruncatedSeqLength)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
84 |
_cost_per_entry_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
85 |
_mixed_cost_per_entry_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
86 |
_cost_per_byte_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
87 |
_cost_per_byte_ms_during_cm_seq(new TruncatedSeq(TruncatedSeqLength)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
88 |
_constant_other_time_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
89 |
_young_other_cost_per_region_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
90 |
_non_young_other_cost_per_region_ms_seq(new TruncatedSeq(TruncatedSeqLength)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
91 |
_pending_cards_seq(new TruncatedSeq(TruncatedSeqLength)), |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
92 |
_rs_lengths_seq(new TruncatedSeq(TruncatedSeqLength)), |
48010 | 93 |
_recent_prev_end_times_for_all_gcs_sec(new TruncatedSeq(NumPrevPausesForHeuristics)), |
94 |
_recent_avg_pause_time_ratio(0.0), |
|
95 |
_last_pause_time_ratio(0.0) { |
|
1374 | 96 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
97 |
// Seed sequences with initial values. |
1374 | 98 |
_recent_prev_end_times_for_all_gcs_sec->add(os::elapsedTime()); |
99 |
_prev_collection_pause_end_ms = os::elapsedTime() * 1000.0; |
|
100 |
||
36191
07d2ba48d1d3
8149013: Remove unused and dead code from G1CollectorPolicy
mgerdin
parents:
36102
diff
changeset
|
101 |
int index = MIN2(ParallelGCThreads - 1, 7u); |
1374 | 102 |
|
103 |
_rs_length_diff_seq->add(rs_length_diff_defaults[index]); |
|
104 |
_cost_per_card_ms_seq->add(cost_per_card_ms_defaults[index]); |
|
33204
b8a3901ac5b3
8069330: Adjustment of concurrent refinement thresholds does not take hot card cache into account
tschatzl
parents:
33150
diff
changeset
|
105 |
_cost_scan_hcc_seq->add(0.0); |
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
106 |
_young_cards_per_entry_ratio_seq->add(young_cards_per_entry_ratio_defaults[index]); |
1374 | 107 |
_cost_per_entry_ms_seq->add(cost_per_entry_ms_defaults[index]); |
108 |
_cost_per_byte_ms_seq->add(cost_per_byte_ms_defaults[index]); |
|
109 |
_constant_other_time_ms_seq->add(constant_other_time_ms_defaults[index]); |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
110 |
_young_other_cost_per_region_ms_seq->add(young_other_cost_per_region_ms_defaults[index]); |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
111 |
_non_young_other_cost_per_region_ms_seq->add(non_young_other_cost_per_region_ms_defaults[index]); |
15806
f3fb856749cf
8008546: Wrong G1ConfidencePercent results in GUARANTEE(VARIANCE() > -1.0) FAILED
poonam
parents:
15089
diff
changeset
|
112 |
|
1374 | 113 |
// start conservatively (around 50ms is about right) |
114 |
_concurrent_mark_remark_times_ms->add(0.05); |
|
115 |
_concurrent_mark_cleanup_times_ms->add(0.20); |
|
21561
c619b1cb4554
8016309: assert(eden_size > 0 && survivor_size > 0) failed: just checking
jwilhelm
parents:
21558
diff
changeset
|
116 |
} |
c619b1cb4554
8016309: assert(eden_size > 0 && survivor_size > 0) failed: just checking
jwilhelm
parents:
21558
diff
changeset
|
117 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
118 |
double G1Analytics::get_new_prediction(TruncatedSeq const* seq) const { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
119 |
return _predictor->get_new_prediction(seq); |
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
34134
diff
changeset
|
120 |
} |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
34134
diff
changeset
|
121 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
122 |
size_t G1Analytics::get_new_size_prediction(TruncatedSeq const* seq) const { |
35196
c83940b346b2
8143215: gcc 4.1.2: fix three issues breaking the build.
goetz
parents:
35163
diff
changeset
|
123 |
return (size_t)get_new_prediction(seq); |
c83940b346b2
8143215: gcc 4.1.2: fix three issues breaking the build.
goetz
parents:
35163
diff
changeset
|
124 |
} |
c83940b346b2
8143215: gcc 4.1.2: fix three issues breaking the build.
goetz
parents:
35163
diff
changeset
|
125 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
126 |
int G1Analytics::num_alloc_rate_ms() const { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
127 |
return _alloc_rate_ms_seq->num(); |
2009 | 128 |
} |
129 |
||
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
130 |
void G1Analytics::report_concurrent_mark_remark_times_ms(double ms) { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
131 |
_concurrent_mark_remark_times_ms->add(ms); |
1374 | 132 |
} |
133 |
||
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
134 |
void G1Analytics::report_alloc_rate_ms(double alloc_rate) { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
135 |
_alloc_rate_ms_seq->add(alloc_rate); |
33591
4a2823c696ce
8138975: G1CollectorPolicy::calculate_young_list_target_length should be const
ehelin
parents:
33218
diff
changeset
|
136 |
} |
10528
06fab03478df
7084509: G1: fix inconsistencies and mistakes in the young list target length calculations
tonyp
parents:
10523
diff
changeset
|
137 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
138 |
void G1Analytics::compute_pause_time_ratio(double interval_ms, double pause_time_ms) { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
139 |
_recent_avg_pause_time_ratio = _recent_gc_times_ms->sum() / interval_ms; |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
140 |
if (_recent_avg_pause_time_ratio < 0.0 || |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
141 |
(_recent_avg_pause_time_ratio - 1.0 > 0.0)) { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
142 |
// Clip ratio between 0.0 and 1.0, and continue. This will be fixed in |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
143 |
// CR 6902692 by redoing the manner in which the ratio is incrementally computed. |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
144 |
if (_recent_avg_pause_time_ratio < 0.0) { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
145 |
_recent_avg_pause_time_ratio = 0.0; |
10528
06fab03478df
7084509: G1: fix inconsistencies and mistakes in the young list target length calculations
tonyp
parents:
10523
diff
changeset
|
146 |
} else { |
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
147 |
assert(_recent_avg_pause_time_ratio - 1.0 > 0.0, "Ctl-point invariant"); |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
148 |
_recent_avg_pause_time_ratio = 1.0; |
1374 | 149 |
} |
150 |
} |
|
151 |
||
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
152 |
// Compute the ratio of just this last pause time to the entire time range stored |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
153 |
// in the vectors. Comparing this pause to the entire range, rather than only the |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
154 |
// most recent interval, has the effect of smoothing over a possible transient 'burst' |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
155 |
// of more frequent pauses that don't really reflect a change in heap occupancy. |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
156 |
// This reduces the likelihood of a needless heap expansion being triggered. |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
157 |
_last_pause_time_ratio = |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
158 |
(pause_time_ms * _recent_prev_end_times_for_all_gcs_sec->num()) / interval_ms; |
1374 | 159 |
} |
160 |
||
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
161 |
void G1Analytics::report_cost_per_card_ms(double cost_per_card_ms) { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
162 |
_cost_per_card_ms_seq->add(cost_per_card_ms); |
33747
2dfa9256eb77
8140602: Split other time calculation into methods in G1CollectorPolicy
ehelin
parents:
33739
diff
changeset
|
163 |
} |
2dfa9256eb77
8140602: Split other time calculation into methods in G1CollectorPolicy
ehelin
parents:
33739
diff
changeset
|
164 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
165 |
void G1Analytics::report_cost_scan_hcc(double cost_scan_hcc) { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
166 |
_cost_scan_hcc_seq->add(cost_scan_hcc); |
11576
e0bef5ca4602
6976060: G1: humongous object allocations should initiate marking cycles when necessary
brutisso
parents:
11455
diff
changeset
|
167 |
} |
e0bef5ca4602
6976060: G1: humongous object allocations should initiate marking cycles when necessary
brutisso
parents:
11455
diff
changeset
|
168 |
|
49643
a3453bbd5418
8199742: Clean up state flags in G1CollectorState
tschatzl
parents:
48010
diff
changeset
|
169 |
void G1Analytics::report_cost_per_entry_ms(double cost_per_entry_ms, bool for_young_gc) { |
a3453bbd5418
8199742: Clean up state flags in G1CollectorState
tschatzl
parents:
48010
diff
changeset
|
170 |
if (for_young_gc) { |
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
171 |
_cost_per_entry_ms_seq->add(cost_per_entry_ms); |
33810
8bbfb74d1f6c
8138740: Start initial mark right after mixed GC if needed
tschatzl
parents:
33809
diff
changeset
|
172 |
} else { |
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
173 |
_mixed_cost_per_entry_ms_seq->add(cost_per_entry_ms); |
10280
3463715b5ef7
6814390: G1: remove the concept of non-generational G1
brutisso
parents:
10243
diff
changeset
|
174 |
} |
1374 | 175 |
} |
176 |
||
49643
a3453bbd5418
8199742: Clean up state flags in G1CollectorState
tschatzl
parents:
48010
diff
changeset
|
177 |
void G1Analytics::report_cards_per_entry_ratio(double cards_per_entry_ratio, bool for_young_gc) { |
a3453bbd5418
8199742: Clean up state flags in G1CollectorState
tschatzl
parents:
48010
diff
changeset
|
178 |
if (for_young_gc) { |
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
179 |
_young_cards_per_entry_ratio_seq->add(cards_per_entry_ratio); |
34299
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
180 |
} else { |
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
181 |
_mixed_cards_per_entry_ratio_seq->add(cards_per_entry_ratio); |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
182 |
} |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
183 |
} |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
184 |
|
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
185 |
void G1Analytics::report_rs_length_diff(double rs_length_diff) { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
186 |
_rs_length_diff_seq->add(rs_length_diff); |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
187 |
} |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
188 |
|
49643
a3453bbd5418
8199742: Clean up state flags in G1CollectorState
tschatzl
parents:
48010
diff
changeset
|
189 |
void G1Analytics::report_cost_per_byte_ms(double cost_per_byte_ms, bool mark_or_rebuild_in_progress) { |
a3453bbd5418
8199742: Clean up state flags in G1CollectorState
tschatzl
parents:
48010
diff
changeset
|
190 |
if (mark_or_rebuild_in_progress) { |
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
191 |
_cost_per_byte_ms_during_cm_seq->add(cost_per_byte_ms); |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
192 |
} else { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
193 |
_cost_per_byte_ms_seq->add(cost_per_byte_ms); |
34299
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
194 |
} |
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
34134
diff
changeset
|
195 |
} |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
34134
diff
changeset
|
196 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
197 |
void G1Analytics::report_young_other_cost_per_region_ms(double other_cost_per_region_ms) { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
198 |
_young_other_cost_per_region_ms_seq->add(other_cost_per_region_ms); |
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
34134
diff
changeset
|
199 |
} |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
34134
diff
changeset
|
200 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
201 |
void G1Analytics::report_non_young_other_cost_per_region_ms(double other_cost_per_region_ms) { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
202 |
_non_young_other_cost_per_region_ms_seq->add(other_cost_per_region_ms); |
33738
1708291bd3d7
8140508: Add utility method for logging phases to G1CollectorPolicy
ehelin
parents:
33624
diff
changeset
|
203 |
} |
1708291bd3d7
8140508: Add utility method for logging phases to G1CollectorPolicy
ehelin
parents:
33624
diff
changeset
|
204 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
205 |
void G1Analytics::report_constant_other_time_ms(double constant_other_time_ms) { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
206 |
_constant_other_time_ms_seq->add(constant_other_time_ms); |
4481 | 207 |
} |
208 |
||
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
209 |
void G1Analytics::report_pending_cards(double pending_cards) { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
210 |
_pending_cards_seq->add(pending_cards); |
37051
b02a3fb98142
8150362: G1 base elapsed time prediction is wrong because rs_length prediction is wrong
sangheki
parents:
37041
diff
changeset
|
211 |
} |
b02a3fb98142
8150362: G1 base elapsed time prediction is wrong because rs_length prediction is wrong
sangheki
parents:
37041
diff
changeset
|
212 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
213 |
void G1Analytics::report_rs_lengths(double rs_lengths) { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
214 |
_rs_lengths_seq->add(rs_lengths); |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
215 |
} |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
216 |
|
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
217 |
size_t G1Analytics::predict_rs_length_diff() const { |
35196
c83940b346b2
8143215: gcc 4.1.2: fix three issues breaking the build.
goetz
parents:
35163
diff
changeset
|
218 |
return get_new_size_prediction(_rs_length_diff_seq); |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
219 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
220 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
221 |
double G1Analytics::predict_alloc_rate_ms() const { |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
222 |
return get_new_prediction(_alloc_rate_ms_seq); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
223 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
224 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
225 |
double G1Analytics::predict_cost_per_card_ms() const { |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
226 |
return get_new_prediction(_cost_per_card_ms_seq); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
227 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
228 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
229 |
double G1Analytics::predict_scan_hcc_ms() const { |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
230 |
return get_new_prediction(_cost_scan_hcc_seq); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
231 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
232 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
233 |
double G1Analytics::predict_rs_update_time_ms(size_t pending_cards) const { |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
234 |
return pending_cards * predict_cost_per_card_ms() + predict_scan_hcc_ms(); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
235 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
236 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
237 |
double G1Analytics::predict_young_cards_per_entry_ratio() const { |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
238 |
return get_new_prediction(_young_cards_per_entry_ratio_seq); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
239 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
240 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
241 |
double G1Analytics::predict_mixed_cards_per_entry_ratio() const { |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
242 |
if (_mixed_cards_per_entry_ratio_seq->num() < 2) { |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
243 |
return predict_young_cards_per_entry_ratio(); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
244 |
} else { |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
245 |
return get_new_prediction(_mixed_cards_per_entry_ratio_seq); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
246 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
247 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
248 |
|
49643
a3453bbd5418
8199742: Clean up state flags in G1CollectorState
tschatzl
parents:
48010
diff
changeset
|
249 |
size_t G1Analytics::predict_card_num(size_t rs_length, bool for_young_gc) const { |
a3453bbd5418
8199742: Clean up state flags in G1CollectorState
tschatzl
parents:
48010
diff
changeset
|
250 |
if (for_young_gc) { |
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
251 |
return (size_t) (rs_length * predict_young_cards_per_entry_ratio()); |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
252 |
} else { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
253 |
return (size_t) (rs_length * predict_mixed_cards_per_entry_ratio()); |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
254 |
} |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
255 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
256 |
|
49643
a3453bbd5418
8199742: Clean up state flags in G1CollectorState
tschatzl
parents:
48010
diff
changeset
|
257 |
double G1Analytics::predict_rs_scan_time_ms(size_t card_num, bool for_young_gc) const { |
a3453bbd5418
8199742: Clean up state flags in G1CollectorState
tschatzl
parents:
48010
diff
changeset
|
258 |
if (for_young_gc) { |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
259 |
return card_num * get_new_prediction(_cost_per_entry_ms_seq); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
260 |
} else { |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
261 |
return predict_mixed_rs_scan_time_ms(card_num); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
262 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
263 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
264 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
265 |
double G1Analytics::predict_mixed_rs_scan_time_ms(size_t card_num) const { |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
266 |
if (_mixed_cost_per_entry_ms_seq->num() < 3) { |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
267 |
return card_num * get_new_prediction(_cost_per_entry_ms_seq); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
268 |
} else { |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
269 |
return card_num * get_new_prediction(_mixed_cost_per_entry_ms_seq); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
270 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
271 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
272 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
273 |
double G1Analytics::predict_object_copy_time_ms_during_cm(size_t bytes_to_copy) const { |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
274 |
if (_cost_per_byte_ms_during_cm_seq->num() < 3) { |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
275 |
return (1.1 * bytes_to_copy) * get_new_prediction(_cost_per_byte_ms_seq); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
276 |
} else { |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
277 |
return bytes_to_copy * get_new_prediction(_cost_per_byte_ms_during_cm_seq); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
278 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
279 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
280 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
281 |
double G1Analytics::predict_object_copy_time_ms(size_t bytes_to_copy, bool during_concurrent_mark) const { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
282 |
if (during_concurrent_mark) { |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
283 |
return predict_object_copy_time_ms_during_cm(bytes_to_copy); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
284 |
} else { |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
285 |
return bytes_to_copy * get_new_prediction(_cost_per_byte_ms_seq); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
286 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
287 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
288 |
|
38249
51b1102fc197
8156022: Add prediction for cost_per_byte_ms to G1Analytics
ehelin
parents:
37134
diff
changeset
|
289 |
double G1Analytics::predict_cost_per_byte_ms() const { |
51b1102fc197
8156022: Add prediction for cost_per_byte_ms to G1Analytics
ehelin
parents:
37134
diff
changeset
|
290 |
return get_new_prediction(_cost_per_byte_ms_seq); |
51b1102fc197
8156022: Add prediction for cost_per_byte_ms to G1Analytics
ehelin
parents:
37134
diff
changeset
|
291 |
} |
51b1102fc197
8156022: Add prediction for cost_per_byte_ms to G1Analytics
ehelin
parents:
37134
diff
changeset
|
292 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
293 |
double G1Analytics::predict_constant_other_time_ms() const { |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
294 |
return get_new_prediction(_constant_other_time_ms_seq); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
295 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
296 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
297 |
double G1Analytics::predict_young_other_time_ms(size_t young_num) const { |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
298 |
return young_num * get_new_prediction(_young_other_cost_per_region_ms_seq); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
299 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
300 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
301 |
double G1Analytics::predict_non_young_other_time_ms(size_t non_young_num) const { |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
302 |
return non_young_num * get_new_prediction(_non_young_other_cost_per_region_ms_seq); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
303 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
304 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
305 |
double G1Analytics::predict_remark_time_ms() const { |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
306 |
return get_new_prediction(_concurrent_mark_remark_times_ms); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
307 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
308 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
309 |
double G1Analytics::predict_cleanup_time_ms() const { |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
310 |
return get_new_prediction(_concurrent_mark_cleanup_times_ms); |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
311 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
312 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
313 |
size_t G1Analytics::predict_rs_lengths() const { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
314 |
return get_new_size_prediction(_rs_lengths_seq); |
33214
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
315 |
} |
5a00fba36171
8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up
tschatzl
parents:
33204
diff
changeset
|
316 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
317 |
size_t G1Analytics::predict_pending_cards() const { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
318 |
return get_new_size_prediction(_pending_cards_seq); |
1374 | 319 |
} |
320 |
||
40523
20873f6704de
8164124: [BACKOUT] G1 does not implement millis_since_last_gc which is needed by RMI GC
jwilhelm
parents:
40328
diff
changeset
|
321 |
double G1Analytics::last_known_gc_end_time_sec() const { |
40328
a2851f5f1cf6
8071770: G1 does not implement millis_since_last_gc which is needed by RMI GC
jprovino
parents:
38249
diff
changeset
|
322 |
return _recent_prev_end_times_for_all_gcs_sec->oldest(); |
a2851f5f1cf6
8071770: G1 does not implement millis_since_last_gc which is needed by RMI GC
jprovino
parents:
38249
diff
changeset
|
323 |
} |
a2851f5f1cf6
8071770: G1 does not implement millis_since_last_gc which is needed by RMI GC
jprovino
parents:
38249
diff
changeset
|
324 |
|
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
325 |
void G1Analytics::update_recent_gc_times(double end_time_sec, |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
326 |
double pause_time_ms) { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
327 |
_recent_gc_times_ms->add(pause_time_ms); |
1374 | 328 |
_recent_prev_end_times_for_all_gcs_sec->add(end_time_sec); |
329 |
_prev_collection_pause_end_ms = end_time_sec * 1000.0; |
|
330 |
} |
|
331 |
||
37134
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
332 |
void G1Analytics::report_concurrent_mark_cleanup_times_ms(double ms) { |
9dd3975ca940
8151711: Move G1 number sequences out of the G1 collector policy
mgerdin
parents:
37080
diff
changeset
|
333 |
_concurrent_mark_cleanup_times_ms->add(ms); |
34619
83b1fedf01e9
8143251: HeapRetentionTest.java Test is failing on jdk9/dev
sjohanss
parents:
34611
diff
changeset
|
334 |
} |