Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp @ 17648:a034dc5e910b
8028391: Make the Min/MaxHeapFreeRatio flags manageable
Summary: Made the flags Min- and MaxHeapFreeRatio manageable, and implemented support for these flags in ParallelGC.
Reviewed-by: sla, mgerdin, brutisso
author | jwilhelm |
---|---|
date | Wed, 29 Jan 2014 23:17:05 +0100 |
parents | 8f07aa079343 |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
17647:3d60c34b14ca | 17648:a034dc5e910b |
---|---|
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 // | |
244 void tenured_allocation(size_t size) { | 243 void tenured_allocation(size_t size) { |
245 _avg_pretenured->sample(size); | 244 _avg_pretenured->sample(size); |
246 } | 245 } |
247 | 246 |
248 // Accessors | 247 // Accessors |
249 // NEEDS_CLEANUP should use sizes.hpp | 248 // NEEDS_CLEANUP should use sizes.hpp |
250 | 249 |
251 size_t calculated_old_free_size_in_bytes() const { | 250 static size_t calculate_free_based_on_live(size_t live, uintx ratio_as_percentage); |
252 return (size_t)(_promo_size + avg_promoted()->padded_average()); | 251 |
253 } | 252 size_t calculated_old_free_size_in_bytes() const; |
254 | 253 |
255 size_t average_old_live_in_bytes() const { | 254 size_t average_old_live_in_bytes() const { |
256 return (size_t) avg_old_live()->average(); | 255 return (size_t) avg_old_live()->average(); |
257 } | 256 } |
258 | 257 |