Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | 44315152d434 |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
35 // based on current application characteristics (based on gc cost | 35 // based on current application characteristics (based on gc cost |
36 // and application footprint). | 36 // and application footprint). |
37 // | 37 // |
38 // It also computes an optimal tenuring threshold between the young | 38 // It also computes an optimal tenuring threshold between the young |
39 // and old generations, so as to equalize the cost of collections | 39 // and old generations, so as to equalize the cost of collections |
40 // of those generations, as well as optimal survivor space sizes | 40 // of those generations, as well as optimial survivor space sizes |
41 // for the young generation. | 41 // for the young generation. |
42 // | 42 // |
43 // While this class is specifically intended for a generational system | 43 // While this class is specifically intended for a generational system |
44 // consisting of a young gen (containing an Eden and two semi-spaces) | 44 // consisting of a young gen (containing an Eden and two semi-spaces) |
45 // and a tenured gen, as well as a perm gen for reflective data, it | 45 // and a tenured gen, as well as a perm gen for reflective data, it |
111 bool _old_gen_policy_is_ready; | 111 bool _old_gen_policy_is_ready; |
112 | 112 |
113 // Changing the generation sizing depends on the data that is | 113 // Changing the generation sizing depends on the data that is |
114 // gathered about the effects of changes on the pause times and | 114 // gathered about the effects of changes on the pause times and |
115 // throughput. These variable count the number of data points | 115 // throughput. These variable count the number of data points |
116 // gathered. The policy may use these counters as a threshold | 116 // gathered. The policy may use these counters as a threshhold |
117 // for reliable data. | 117 // for reliable data. |
118 julong _young_gen_change_for_major_pause_count; | 118 julong _young_gen_change_for_major_pause_count; |
119 | 119 |
120 // To facilitate faster growth at start up, supplement the normal | 120 // To facilitate faster growth at start up, supplement the normal |
121 // growth percentage for the young gen eden and the | 121 // growth percentage for the young gen eden and the |
238 // called by GC algorithms. It is the responsibility of users of this | 238 // called by GC algorithms. It is the responsibility of users of this |
239 // policy to call these methods at the correct times! | 239 // policy to call these methods at the correct times! |
240 void major_collection_begin(); | 240 void major_collection_begin(); |
241 void major_collection_end(size_t amount_live, GCCause::Cause gc_cause); | 241 void major_collection_end(size_t amount_live, GCCause::Cause gc_cause); |
242 | 242 |
243 // | |
243 void tenured_allocation(size_t size) { | 244 void tenured_allocation(size_t size) { |
244 _avg_pretenured->sample(size); | 245 _avg_pretenured->sample(size); |
245 } | 246 } |
246 | 247 |
247 // Accessors | 248 // Accessors |
248 // NEEDS_CLEANUP should use sizes.hpp | 249 // NEEDS_CLEANUP should use sizes.hpp |
249 | 250 |
250 static size_t calculate_free_based_on_live(size_t live, uintx ratio_as_percentage); | 251 size_t calculated_old_free_size_in_bytes() const { |
251 | 252 return (size_t)(_promo_size + avg_promoted()->padded_average()); |
252 size_t calculated_old_free_size_in_bytes() const; | 253 } |
253 | 254 |
254 size_t average_old_live_in_bytes() const { | 255 size_t average_old_live_in_bytes() const { |
255 return (size_t) avg_old_live()->average(); | 256 return (size_t) avg_old_live()->average(); |
256 } | 257 } |
257 | 258 |