src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/gc_implementation/parallelScavenge

src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp

Print this page




 221 
 222   // Input arguments are initial free space sizes for young and old
 223   // generations, the initial survivor space size, the
 224   // alignment values and the pause & throughput goals.
 225   //
 226   // NEEDS_CLEANUP this is a singleton object
 227   PSAdaptiveSizePolicy(size_t init_eden_size,
 228                        size_t init_promo_size,
 229                        size_t init_survivor_size,
 230                        size_t intra_generation_alignment,
 231                        double gc_pause_goal_sec,
 232                        double gc_minor_pause_goal_sec,
 233                        uint gc_time_ratio);
 234 
 235   // Methods indicating events of interest to the adaptive size policy,
 236   // called by GC algorithms. It is the responsibility of users of this
 237   // policy to call these methods at the correct times!
 238   void major_collection_begin();
 239   void major_collection_end(size_t amount_live, GCCause::Cause gc_cause);
 240 
 241   //
 242   void tenured_allocation(size_t size) {
 243     _avg_pretenured->sample(size);
 244   }
 245 
 246   // Accessors
 247   // NEEDS_CLEANUP   should use sizes.hpp
 248 
 249   size_t calculated_old_free_size_in_bytes() const {
 250     return (size_t)(_promo_size + avg_promoted()->padded_average());
 251   }
 252 
 253   size_t average_old_live_in_bytes() const {
 254     return (size_t) avg_old_live()->average();
 255   }
 256 
 257   size_t average_promoted_in_bytes() const {
 258     return (size_t)avg_promoted()->average();
 259   }
 260 
 261   size_t padded_average_promoted_in_bytes() const {
 262     return (size_t)avg_promoted()->padded_average();
 263   }
 264 
 265   int change_young_gen_for_maj_pauses() {
 266     return _change_young_gen_for_maj_pauses;
 267   }
 268   void set_change_young_gen_for_maj_pauses(int v) {
 269     _change_young_gen_for_maj_pauses = v;
 270   }
 271 




 221 
 222   // Input arguments are initial free space sizes for young and old
 223   // generations, the initial survivor space size, the
 224   // alignment values and the pause & throughput goals.
 225   //
 226   // NEEDS_CLEANUP this is a singleton object
 227   PSAdaptiveSizePolicy(size_t init_eden_size,
 228                        size_t init_promo_size,
 229                        size_t init_survivor_size,
 230                        size_t intra_generation_alignment,
 231                        double gc_pause_goal_sec,
 232                        double gc_minor_pause_goal_sec,
 233                        uint gc_time_ratio);
 234 
 235   // Methods indicating events of interest to the adaptive size policy,
 236   // called by GC algorithms. It is the responsibility of users of this
 237   // policy to call these methods at the correct times!
 238   void major_collection_begin();
 239   void major_collection_end(size_t amount_live, GCCause::Cause gc_cause);
 240 

 241   void tenured_allocation(size_t size) {
 242     _avg_pretenured->sample(size);
 243   }
 244 
 245   // Accessors
 246   // NEEDS_CLEANUP   should use sizes.hpp
 247 
 248   static size_t calculate_free_based_on_live(size_t live, uintx ratio_as_percentage);
 249 
 250   size_t calculated_old_free_size_in_bytes() const;
 251 
 252   size_t average_old_live_in_bytes() const {
 253     return (size_t) avg_old_live()->average();
 254   }
 255 
 256   size_t average_promoted_in_bytes() const {
 257     return (size_t)avg_promoted()->average();
 258   }
 259 
 260   size_t padded_average_promoted_in_bytes() const {
 261     return (size_t)avg_promoted()->padded_average();
 262   }
 263 
 264   int change_young_gen_for_maj_pauses() {
 265     return _change_young_gen_for_maj_pauses;
 266   }
 267   void set_change_young_gen_for_maj_pauses(int v) {
 268     _change_young_gen_for_maj_pauses = v;
 269   }
 270 


src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File