author | mgerdin |
Wed, 03 Feb 2016 11:33:33 +0100 | |
changeset 35927 | 58bbbbb4a8c7 |
parent 35196 | c83940b346b2 |
child 36366 | 664ae1e77870 |
permissions | -rw-r--r-- |
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
1 |
/* |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
2 |
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
4 |
* |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
8 |
* |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
13 |
* accompanied this code). |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
14 |
* |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
18 |
* |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
21 |
* questions. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
22 |
* |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
23 |
*/ |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
24 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
25 |
#include "precompiled.hpp" |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
26 |
#include "gc/g1/g1CollectedHeap.inline.hpp" |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
27 |
#include "gc/g1/g1IHOPControl.hpp" |
34299
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
28 |
#include "gc/g1/g1Predictions.hpp" |
34300 | 29 |
#include "gc/shared/gcTrace.hpp" |
35061 | 30 |
#include "logging/log.hpp" |
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
31 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
32 |
G1IHOPControl::G1IHOPControl(double initial_ihop_percent, size_t target_occupancy) : |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
33 |
_initial_ihop_percent(initial_ihop_percent), |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
34 |
_target_occupancy(target_occupancy), |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
35 |
_last_allocated_bytes(0), |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
36 |
_last_allocation_time_s(0.0) |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
37 |
{ |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
38 |
assert(_initial_ihop_percent >= 0.0 && _initial_ihop_percent <= 100.0, "Initial IHOP value must be between 0 and 100 but is %.3f", initial_ihop_percent); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
39 |
} |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
40 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
41 |
void G1IHOPControl::update_allocation_info(double allocation_time_s, size_t allocated_bytes, size_t additional_buffer_size) { |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
42 |
assert(allocation_time_s >= 0.0, "Allocation time must be positive but is %.3f", allocation_time_s); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
43 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
44 |
_last_allocation_time_s = allocation_time_s; |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
45 |
_last_allocated_bytes = allocated_bytes; |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
46 |
} |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
47 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
48 |
void G1IHOPControl::print() { |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
49 |
size_t cur_conc_mark_start_threshold = get_conc_mark_start_threshold(); |
35061 | 50 |
log_debug(gc, ihop)("Basic information (value update), threshold: " SIZE_FORMAT "B (%1.2f), target occupancy: " SIZE_FORMAT "B, current occupancy: " SIZE_FORMAT "B," |
51 |
" recent old gen allocation rate: %1.2f, recent marking phase length: %1.2f", |
|
52 |
cur_conc_mark_start_threshold, |
|
53 |
cur_conc_mark_start_threshold * 100.0 / _target_occupancy, |
|
54 |
_target_occupancy, |
|
55 |
G1CollectedHeap::heap()->used(), |
|
56 |
_last_allocation_time_s > 0.0 ? _last_allocated_bytes / _last_allocation_time_s : 0.0, |
|
57 |
last_marking_length_s()); |
|
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
58 |
} |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
59 |
|
34300 | 60 |
void G1IHOPControl::send_trace_event(G1NewTracer* tracer) { |
61 |
tracer->report_basic_ihop_statistics(get_conc_mark_start_threshold(), |
|
62 |
_target_occupancy, |
|
63 |
G1CollectedHeap::heap()->used(), |
|
64 |
_last_allocated_bytes, |
|
65 |
_last_allocation_time_s, |
|
66 |
last_marking_length_s()); |
|
67 |
} |
|
68 |
||
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
69 |
G1StaticIHOPControl::G1StaticIHOPControl(double ihop_percent, size_t target_occupancy) : |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
70 |
G1IHOPControl(ihop_percent, target_occupancy), |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
71 |
_last_marking_length_s(0.0) { |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
72 |
assert(_target_occupancy > 0, "Target occupancy must be larger than zero."); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
73 |
} |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
74 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
75 |
#ifndef PRODUCT |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
76 |
static void test_update(G1IHOPControl* ctrl, double alloc_time, size_t alloc_amount, size_t young_size, double mark_time) { |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
77 |
for (int i = 0; i < 100; i++) { |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
78 |
ctrl->update_allocation_info(alloc_time, alloc_amount, young_size); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
79 |
ctrl->update_marking_length(mark_time); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
80 |
} |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
81 |
} |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
82 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
83 |
void G1StaticIHOPControl::test() { |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
84 |
size_t const initial_ihop = 45; |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
85 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
86 |
G1StaticIHOPControl ctrl(initial_ihop, 100); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
87 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
88 |
size_t threshold = ctrl.get_conc_mark_start_threshold(); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
89 |
assert(threshold == initial_ihop, |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
90 |
"Expected IHOP threshold of " SIZE_FORMAT " but is " SIZE_FORMAT, initial_ihop, threshold); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
91 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
92 |
ctrl.update_allocation_info(100.0, 100, 100); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
93 |
threshold = ctrl.get_conc_mark_start_threshold(); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
94 |
assert(threshold == initial_ihop, |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
95 |
"Expected IHOP threshold of " SIZE_FORMAT " but is " SIZE_FORMAT, initial_ihop, threshold); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
96 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
97 |
ctrl.update_marking_length(1000.0); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
98 |
threshold = ctrl.get_conc_mark_start_threshold(); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
99 |
assert(threshold == initial_ihop, |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
100 |
"Expected IHOP threshold of " SIZE_FORMAT " but is " SIZE_FORMAT, initial_ihop, threshold); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
101 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
102 |
// Whatever we pass, the IHOP value must stay the same. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
103 |
test_update(&ctrl, 2, 10, 10, 3); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
104 |
threshold = ctrl.get_conc_mark_start_threshold(); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
105 |
assert(threshold == initial_ihop, |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
106 |
"Expected IHOP threshold of " SIZE_FORMAT " but is " SIZE_FORMAT, initial_ihop, threshold); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
107 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
108 |
test_update(&ctrl, 12, 10, 10, 3); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
109 |
threshold = ctrl.get_conc_mark_start_threshold(); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
110 |
assert(threshold == initial_ihop, |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
111 |
"Expected IHOP threshold of " SIZE_FORMAT " but is " SIZE_FORMAT, initial_ihop, threshold); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
112 |
} |
34299
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
113 |
#endif |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
114 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
115 |
G1AdaptiveIHOPControl::G1AdaptiveIHOPControl(double ihop_percent, |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
116 |
size_t initial_target_occupancy, |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
117 |
G1Predictions const* predictor, |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
118 |
size_t heap_reserve_percent, |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
119 |
size_t heap_waste_percent) : |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
120 |
G1IHOPControl(ihop_percent, initial_target_occupancy), |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
121 |
_predictor(predictor), |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
122 |
_marking_times_s(10, 0.95), |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
123 |
_allocation_rate_s(10, 0.95), |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
124 |
_last_unrestrained_young_size(0), |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
125 |
_heap_reserve_percent(heap_reserve_percent), |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
126 |
_heap_waste_percent(heap_waste_percent) |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
127 |
{ |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
128 |
} |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
129 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
130 |
size_t G1AdaptiveIHOPControl::actual_target_threshold() const { |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
131 |
// The actual target threshold takes the heap reserve and the expected waste in |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
132 |
// free space into account. |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
133 |
// _heap_reserve is that part of the total heap capacity that is reserved for |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
134 |
// eventual promotion failure. |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
135 |
// _heap_waste is the amount of space will never be reclaimed in any |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
136 |
// heap, so can not be used for allocation during marking and must always be |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
137 |
// considered. |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
138 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
139 |
double safe_total_heap_percentage = MIN2((double)(_heap_reserve_percent + _heap_waste_percent), 100.0); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
140 |
|
35196
c83940b346b2
8143215: gcc 4.1.2: fix three issues breaking the build.
goetz
parents:
35061
diff
changeset
|
141 |
return (size_t)MIN2( |
34299
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
142 |
G1CollectedHeap::heap()->max_capacity() * (100.0 - safe_total_heap_percentage) / 100.0, |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
143 |
_target_occupancy * (100.0 - _heap_waste_percent) / 100.0 |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
144 |
); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
145 |
} |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
146 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
147 |
bool G1AdaptiveIHOPControl::have_enough_data_for_prediction() const { |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
148 |
return ((size_t)_marking_times_s.num() >= G1AdaptiveIHOPNumInitialSamples) && |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
149 |
((size_t)_allocation_rate_s.num() >= G1AdaptiveIHOPNumInitialSamples); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
150 |
} |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
151 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
152 |
size_t G1AdaptiveIHOPControl::get_conc_mark_start_threshold() { |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
153 |
if (have_enough_data_for_prediction()) { |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
154 |
double pred_marking_time = _predictor->get_new_prediction(&_marking_times_s); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
155 |
double pred_promotion_rate = _predictor->get_new_prediction(&_allocation_rate_s); |
35196
c83940b346b2
8143215: gcc 4.1.2: fix three issues breaking the build.
goetz
parents:
35061
diff
changeset
|
156 |
size_t pred_promotion_size = (size_t)(pred_marking_time * pred_promotion_rate); |
34299
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
157 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
158 |
size_t predicted_needed_bytes_during_marking = |
35196
c83940b346b2
8143215: gcc 4.1.2: fix three issues breaking the build.
goetz
parents:
35061
diff
changeset
|
159 |
pred_promotion_size + |
c83940b346b2
8143215: gcc 4.1.2: fix three issues breaking the build.
goetz
parents:
35061
diff
changeset
|
160 |
// In reality we would need the maximum size of the young gen during |
c83940b346b2
8143215: gcc 4.1.2: fix three issues breaking the build.
goetz
parents:
35061
diff
changeset
|
161 |
// marking. This is a conservative estimate. |
c83940b346b2
8143215: gcc 4.1.2: fix three issues breaking the build.
goetz
parents:
35061
diff
changeset
|
162 |
_last_unrestrained_young_size; |
34299
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
163 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
164 |
size_t internal_threshold = actual_target_threshold(); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
165 |
size_t predicted_initiating_threshold = predicted_needed_bytes_during_marking < internal_threshold ? |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
166 |
internal_threshold - predicted_needed_bytes_during_marking : |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
167 |
0; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
168 |
return predicted_initiating_threshold; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
169 |
} else { |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
170 |
// Use the initial value. |
35196
c83940b346b2
8143215: gcc 4.1.2: fix three issues breaking the build.
goetz
parents:
35061
diff
changeset
|
171 |
return (size_t)(_initial_ihop_percent * _target_occupancy / 100.0); |
34299
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
172 |
} |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
173 |
} |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
174 |
|
35196
c83940b346b2
8143215: gcc 4.1.2: fix three issues breaking the build.
goetz
parents:
35061
diff
changeset
|
175 |
void G1AdaptiveIHOPControl::update_allocation_info(double allocation_time_s, |
c83940b346b2
8143215: gcc 4.1.2: fix three issues breaking the build.
goetz
parents:
35061
diff
changeset
|
176 |
size_t allocated_bytes, |
c83940b346b2
8143215: gcc 4.1.2: fix three issues breaking the build.
goetz
parents:
35061
diff
changeset
|
177 |
size_t additional_buffer_size) { |
34300 | 178 |
G1IHOPControl::update_allocation_info(allocation_time_s, allocated_bytes, additional_buffer_size); |
179 |
||
34299
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
180 |
double allocation_rate = (double) allocated_bytes / allocation_time_s; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
181 |
_allocation_rate_s.add(allocation_rate); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
182 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
183 |
_last_unrestrained_young_size = additional_buffer_size; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
184 |
} |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
185 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
186 |
void G1AdaptiveIHOPControl::update_marking_length(double marking_length_s) { |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
187 |
assert(marking_length_s >= 0.0, "Marking length must be larger than zero but is %.3f", marking_length_s); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
188 |
_marking_times_s.add(marking_length_s); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
189 |
} |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
190 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
191 |
void G1AdaptiveIHOPControl::print() { |
34300 | 192 |
G1IHOPControl::print(); |
34299
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
193 |
size_t actual_target = actual_target_threshold(); |
35061 | 194 |
log_debug(gc, ihop)("Adaptive IHOP information (value update), threshold: " SIZE_FORMAT "B (%1.2f), internal target occupancy: " SIZE_FORMAT "B," |
195 |
" predicted old gen allocation rate: %1.2f, predicted marking phase length: %1.2f, prediction active: %s", |
|
196 |
get_conc_mark_start_threshold(), |
|
197 |
percent_of(get_conc_mark_start_threshold(), actual_target), |
|
198 |
actual_target, |
|
199 |
_predictor->get_new_prediction(&_allocation_rate_s), |
|
200 |
_predictor->get_new_prediction(&_marking_times_s), |
|
201 |
have_enough_data_for_prediction() ? "true" : "false"); |
|
34299
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
202 |
} |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
203 |
|
34300 | 204 |
void G1AdaptiveIHOPControl::send_trace_event(G1NewTracer* tracer) { |
205 |
G1IHOPControl::send_trace_event(tracer); |
|
206 |
tracer->report_adaptive_ihop_statistics(get_conc_mark_start_threshold(), |
|
207 |
actual_target_threshold(), |
|
208 |
G1CollectedHeap::heap()->used(), |
|
209 |
_last_unrestrained_young_size, |
|
210 |
_predictor->get_new_prediction(&_allocation_rate_s), |
|
211 |
_predictor->get_new_prediction(&_marking_times_s), |
|
212 |
have_enough_data_for_prediction()); |
|
213 |
} |
|
214 |
||
34299
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
215 |
#ifndef PRODUCT |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
216 |
void G1AdaptiveIHOPControl::test() { |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
217 |
size_t const initial_threshold = 45; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
218 |
size_t const young_size = 10; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
219 |
size_t const target_size = 100; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
220 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
221 |
// The final IHOP value is always |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
222 |
// target_size - (young_size + alloc_amount/alloc_time * marking_time) |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
223 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
224 |
G1Predictions pred(0.95); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
225 |
G1AdaptiveIHOPControl ctrl(initial_threshold, target_size, &pred, 0, 0); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
226 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
227 |
// First "load". |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
228 |
size_t const alloc_time1 = 2; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
229 |
size_t const alloc_amount1 = 10; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
230 |
size_t const marking_time1 = 2; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
231 |
size_t const settled_ihop1 = target_size - (young_size + alloc_amount1/alloc_time1 * marking_time1); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
232 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
233 |
size_t threshold; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
234 |
threshold = ctrl.get_conc_mark_start_threshold(); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
235 |
assert(threshold == initial_threshold, |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
236 |
"Expected IHOP threshold of " SIZE_FORMAT " but is " SIZE_FORMAT, initial_threshold, threshold); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
237 |
for (size_t i = 0; i < G1AdaptiveIHOPNumInitialSamples - 1; i++) { |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
238 |
ctrl.update_allocation_info(alloc_time1, alloc_amount1, young_size); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
239 |
ctrl.update_marking_length(marking_time1); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
240 |
// Not enough data yet. |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
241 |
threshold = ctrl.get_conc_mark_start_threshold(); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
242 |
assert(threshold == initial_threshold, |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
243 |
"Expected IHOP threshold of " SIZE_FORMAT " but is " SIZE_FORMAT, initial_threshold, threshold); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
244 |
} |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
245 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
246 |
test_update(&ctrl, alloc_time1, alloc_amount1, young_size, marking_time1); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
247 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
248 |
threshold = ctrl.get_conc_mark_start_threshold(); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
249 |
assert(threshold == settled_ihop1, |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
250 |
"Expected IHOP threshold to settle at " SIZE_FORMAT " but is " SIZE_FORMAT, settled_ihop1, threshold); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
251 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
252 |
// Second "load". A bit higher allocation rate. |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
253 |
size_t const alloc_time2 = 2; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
254 |
size_t const alloc_amount2 = 30; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
255 |
size_t const marking_time2 = 2; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
256 |
size_t const settled_ihop2 = target_size - (young_size + alloc_amount2/alloc_time2 * marking_time2); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
257 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
258 |
test_update(&ctrl, alloc_time2, alloc_amount2, young_size, marking_time2); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
259 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
260 |
threshold = ctrl.get_conc_mark_start_threshold(); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
261 |
assert(threshold < settled_ihop1, |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
262 |
"Expected IHOP threshold to settle at a value lower than " SIZE_FORMAT " but is " SIZE_FORMAT, settled_ihop1, threshold); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
263 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
264 |
// Third "load". Very high (impossible) allocation rate. |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
265 |
size_t const alloc_time3 = 1; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
266 |
size_t const alloc_amount3 = 50; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
267 |
size_t const marking_time3 = 2; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
268 |
size_t const settled_ihop3 = 0; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
269 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
270 |
test_update(&ctrl, alloc_time3, alloc_amount3, young_size, marking_time3); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
271 |
threshold = ctrl.get_conc_mark_start_threshold(); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
272 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
273 |
assert(threshold == settled_ihop3, |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
274 |
"Expected IHOP threshold to settle at " SIZE_FORMAT " but is " SIZE_FORMAT, settled_ihop3, threshold); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
275 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
276 |
// And back to some arbitrary value. |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
277 |
test_update(&ctrl, alloc_time2, alloc_amount2, young_size, marking_time2); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
278 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
279 |
threshold = ctrl.get_conc_mark_start_threshold(); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
280 |
assert(threshold > settled_ihop3, |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
281 |
"Expected IHOP threshold to settle at value larger than " SIZE_FORMAT " but is " SIZE_FORMAT, settled_ihop3, threshold); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
282 |
} |
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
283 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
284 |
void IHOP_test() { |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
285 |
G1StaticIHOPControl::test(); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
286 |
} |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
287 |
#endif |