author | erikj |
Tue, 12 Sep 2017 19:03:39 +0200 | |
changeset 47216 | 71c04702a3d5 |
parent 41316 | hotspot/src/share/vm/gc/g1/g1IHOPControl.hpp@216f4f645fd8 |
child 53244 | 9807daeb47c4 |
permissions | -rw-r--r-- |
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
1 |
/* |
41316 | 2 |
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. |
34298
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 |
#ifndef SHARE_VM_GC_G1_G1IHOPCONTROL_HPP |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
26 |
#define SHARE_VM_GC_G1_G1IHOPCONTROL_HPP |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
27 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
28 |
#include "memory/allocation.hpp" |
34299
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
29 |
#include "utilities/numberSeq.hpp" |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
30 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
31 |
class G1Predictions; |
34300 | 32 |
class G1NewTracer; |
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
33 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
34 |
// Base class for algorithms that calculate the heap occupancy at which |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
35 |
// concurrent marking should start. This heap usage threshold should be relative |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
36 |
// to old gen size. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
37 |
class G1IHOPControl : public CHeapObj<mtGC> { |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
38 |
protected: |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
39 |
// The initial IHOP value relative to the target occupancy. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
40 |
double _initial_ihop_percent; |
36577
e177c49493e9
8142484: Let IHOP follow the current capacity, not the maximum capacity
tschatzl
parents:
34300
diff
changeset
|
41 |
// The target maximum occupancy of the heap. The target occupancy is the number |
e177c49493e9
8142484: Let IHOP follow the current capacity, not the maximum capacity
tschatzl
parents:
34300
diff
changeset
|
42 |
// of bytes when marking should be finished and reclaim started. |
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
43 |
size_t _target_occupancy; |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
44 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
45 |
// Most recent complete mutator allocation period in seconds. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
46 |
double _last_allocation_time_s; |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
47 |
// Amount of bytes allocated during _last_allocation_time_s. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
48 |
size_t _last_allocated_bytes; |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
49 |
|
36577
e177c49493e9
8142484: Let IHOP follow the current capacity, not the maximum capacity
tschatzl
parents:
34300
diff
changeset
|
50 |
// Initialize an instance with the initial IHOP value in percent. The target |
e177c49493e9
8142484: Let IHOP follow the current capacity, not the maximum capacity
tschatzl
parents:
34300
diff
changeset
|
51 |
// occupancy will be updated at the first heap expansion. |
e177c49493e9
8142484: Let IHOP follow the current capacity, not the maximum capacity
tschatzl
parents:
34300
diff
changeset
|
52 |
G1IHOPControl(double initial_ihop_percent); |
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
53 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
54 |
// Most recent time from the end of the initial mark to the start of the first |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
55 |
// mixed gc. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
56 |
virtual double last_marking_length_s() const = 0; |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
57 |
public: |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
58 |
virtual ~G1IHOPControl() { } |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
59 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
60 |
// Get the current non-young occupancy at which concurrent marking should start. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
61 |
virtual size_t get_conc_mark_start_threshold() = 0; |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
62 |
|
36577
e177c49493e9
8142484: Let IHOP follow the current capacity, not the maximum capacity
tschatzl
parents:
34300
diff
changeset
|
63 |
// Adjust target occupancy. |
e177c49493e9
8142484: Let IHOP follow the current capacity, not the maximum capacity
tschatzl
parents:
34300
diff
changeset
|
64 |
virtual void update_target_occupancy(size_t new_target_occupancy); |
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
65 |
// Update information about time during which allocations in the Java heap occurred, |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
66 |
// how large these allocations were in bytes, and an additional buffer. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
67 |
// The allocations should contain any amount of space made unusable for further |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
68 |
// allocation, e.g. any waste caused by TLAB allocation, space at the end of |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
69 |
// humongous objects that can not be used for allocation, etc. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
70 |
// Together with the target occupancy, this additional buffer should contain the |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
71 |
// difference between old gen size and total heap size at the start of reclamation, |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
72 |
// and space required for that reclamation. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
73 |
virtual void 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
|
74 |
// Update the time spent in the mutator beginning from the end of initial mark to |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
75 |
// the first mixed gc. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
76 |
virtual void update_marking_length(double marking_length_s) = 0; |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
77 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
78 |
virtual void print(); |
34300 | 79 |
virtual void send_trace_event(G1NewTracer* tracer); |
34298
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 |
// The returned concurrent mark starting occupancy threshold is a fixed value |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
83 |
// relative to the maximum heap size. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
84 |
class G1StaticIHOPControl : public G1IHOPControl { |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
85 |
// Most recent mutator time between the end of initial mark to the start of the |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
86 |
// first mixed gc. |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
87 |
double _last_marking_length_s; |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
88 |
protected: |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
89 |
double last_marking_length_s() const { return _last_marking_length_s; } |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
90 |
public: |
36577
e177c49493e9
8142484: Let IHOP follow the current capacity, not the maximum capacity
tschatzl
parents:
34300
diff
changeset
|
91 |
G1StaticIHOPControl(double ihop_percent); |
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
92 |
|
36577
e177c49493e9
8142484: Let IHOP follow the current capacity, not the maximum capacity
tschatzl
parents:
34300
diff
changeset
|
93 |
size_t get_conc_mark_start_threshold() { |
e177c49493e9
8142484: Let IHOP follow the current capacity, not the maximum capacity
tschatzl
parents:
34300
diff
changeset
|
94 |
guarantee(_target_occupancy > 0, "Target occupancy must have been initialized."); |
e177c49493e9
8142484: Let IHOP follow the current capacity, not the maximum capacity
tschatzl
parents:
34300
diff
changeset
|
95 |
return (size_t) (_initial_ihop_percent * _target_occupancy / 100.0); |
e177c49493e9
8142484: Let IHOP follow the current capacity, not the maximum capacity
tschatzl
parents:
34300
diff
changeset
|
96 |
} |
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
97 |
|
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
98 |
virtual void update_marking_length(double marking_length_s) { |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
99 |
assert(marking_length_s > 0.0, "Marking length must be larger than zero but is %.3f", marking_length_s); |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
100 |
_last_marking_length_s = marking_length_s; |
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 |
}; |
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
103 |
|
34299
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
104 |
// This algorithm tries to return a concurrent mark starting occupancy value that |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
105 |
// makes sure that during marking the given target occupancy is never exceeded, |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
106 |
// based on predictions of current allocation rate and time periods between |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
107 |
// initial mark and the first mixed gc. |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
108 |
class G1AdaptiveIHOPControl : public G1IHOPControl { |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
109 |
size_t _heap_reserve_percent; // Percentage of maximum heap capacity we should avoid to touch |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
110 |
size_t _heap_waste_percent; // Percentage of free heap that should be considered as waste. |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
111 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
112 |
const G1Predictions * _predictor; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
113 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
114 |
TruncatedSeq _marking_times_s; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
115 |
TruncatedSeq _allocation_rate_s; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
116 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
117 |
// The most recent unrestrained size of the young gen. This is used as an additional |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
118 |
// factor in the calculation of the threshold, as the threshold is based on |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
119 |
// non-young gen occupancy at the end of GC. For the IHOP threshold, we need to |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
120 |
// consider the young gen size during that time too. |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
121 |
// Since we cannot know what young gen sizes are used in the future, we will just |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
122 |
// use the current one. We expect that this one will be one with a fairly large size, |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
123 |
// as there is no marking or mixed gc that could impact its size too much. |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
124 |
size_t _last_unrestrained_young_size; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
125 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
126 |
bool have_enough_data_for_prediction() const; |
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 |
// The "actual" target threshold the algorithm wants to keep during and at the |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
129 |
// end of marking. This is typically lower than the requested threshold, as the |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
130 |
// algorithm needs to consider restrictions by the environment. |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
131 |
size_t actual_target_threshold() const; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
132 |
protected: |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
133 |
virtual double last_marking_length_s() const { return _marking_times_s.last(); } |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
134 |
public: |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
135 |
G1AdaptiveIHOPControl(double ihop_percent, |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
136 |
G1Predictions const* predictor, |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
137 |
size_t heap_reserve_percent, // The percentage of total heap capacity that should not be tapped into. |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
138 |
size_t heap_waste_percent); // The percentage of the free space in the heap that we think is not usable for allocation. |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
139 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
140 |
virtual size_t get_conc_mark_start_threshold(); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
141 |
|
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
142 |
virtual void update_allocation_info(double allocation_time_s, size_t allocated_bytes, size_t additional_buffer_size); |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
143 |
virtual void update_marking_length(double marking_length_s); |
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 |
virtual void print(); |
34300 | 146 |
virtual void send_trace_event(G1NewTracer* tracer); |
34299
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
147 |
}; |
3fdfdda0ac1f
8136678: Implement adaptive sizing algorithm for IHOP
tschatzl
parents:
34298
diff
changeset
|
148 |
|
34298
f3c9dcc5af96
8136681: Factor out IHOP calculation from G1CollectorPolicy
tschatzl
parents:
diff
changeset
|
149 |
#endif // SHARE_VM_GC_G1_G1IHOPCONTROL_HPP |