Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp @ 1991:016a3628c885
6994056: G1: when GC locker is active, extend the Eden instead of allocating into the old gen
Summary: Allow the eden to the expanded up to a point when the GC locker is active.
Reviewed-by: jwilhelm, johnc, ysr, jcoomes
author | tonyp |
---|---|
date | Tue, 07 Dec 2010 16:47:42 -0500 |
parents | 631f79e71e90 |
children | 5c0b591e1074 |
comparison
equal
deleted
inserted
replaced
1975:d9310331a29c | 1991:016a3628c885 |
---|---|
194 bool _adaptive_young_list_length; | 194 bool _adaptive_young_list_length; |
195 size_t _young_list_min_length; | 195 size_t _young_list_min_length; |
196 size_t _young_list_target_length; | 196 size_t _young_list_target_length; |
197 size_t _young_list_fixed_length; | 197 size_t _young_list_fixed_length; |
198 | 198 |
199 // The max number of regions we can extend the eden by while the GC | |
200 // locker is active. This should be >= _young_list_target_length; | |
201 size_t _young_list_max_length; | |
202 | |
199 size_t _young_cset_length; | 203 size_t _young_cset_length; |
200 bool _last_young_gc_full; | 204 bool _last_young_gc_full; |
201 | 205 |
202 unsigned _full_young_pause_num; | 206 unsigned _full_young_pause_num; |
203 unsigned _partial_young_pause_num; | 207 unsigned _partial_young_pause_num; |
1111 // do that for any other surv rate groups | 1115 // do that for any other surv rate groups |
1112 } | 1116 } |
1113 | 1117 |
1114 bool is_young_list_full() { | 1118 bool is_young_list_full() { |
1115 size_t young_list_length = _g1->young_list()->length(); | 1119 size_t young_list_length = _g1->young_list()->length(); |
1116 size_t young_list_max_length = _young_list_target_length; | 1120 size_t young_list_target_length = _young_list_target_length; |
1121 if (G1FixedEdenSize) { | |
1122 young_list_target_length -= _max_survivor_regions; | |
1123 } | |
1124 return young_list_length >= young_list_target_length; | |
1125 } | |
1126 | |
1127 bool can_expand_young_list() { | |
1128 size_t young_list_length = _g1->young_list()->length(); | |
1129 size_t young_list_max_length = _young_list_max_length; | |
1117 if (G1FixedEdenSize) { | 1130 if (G1FixedEdenSize) { |
1118 young_list_max_length -= _max_survivor_regions; | 1131 young_list_max_length -= _max_survivor_regions; |
1119 } | 1132 } |
1120 | 1133 return young_list_length < young_list_max_length; |
1121 return young_list_length >= young_list_max_length; | 1134 } |
1122 } | 1135 |
1123 void update_region_num(bool young); | 1136 void update_region_num(bool young); |
1124 | 1137 |
1125 bool in_young_gc_mode() { | 1138 bool in_young_gc_mode() { |
1126 return _in_young_gc_mode; | 1139 return _in_young_gc_mode; |
1127 } | 1140 } |
1228 | 1241 |
1229 void record_thread_age_table(ageTable* age_table) | 1242 void record_thread_age_table(ageTable* age_table) |
1230 { | 1243 { |
1231 _survivors_age_table.merge_par(age_table); | 1244 _survivors_age_table.merge_par(age_table); |
1232 } | 1245 } |
1246 | |
1247 void calculate_max_gc_locker_expansion(); | |
1233 | 1248 |
1234 // Calculates survivor space parameters. | 1249 // Calculates survivor space parameters. |
1235 void calculate_survivors_policy(); | 1250 void calculate_survivors_policy(); |
1236 | 1251 |
1237 }; | 1252 }; |