319 320 LinearLeastSquareFit* major_pause_young_estimator() { 321 return _major_pause_young_estimator; 322 } 323 324 325 virtual void clear_generation_free_space_flags(); 326 327 float major_pause_old_slope() { return _major_pause_old_estimator->slope(); } 328 float major_pause_young_slope() { 329 return _major_pause_young_estimator->slope(); 330 } 331 float major_collection_slope() { return _major_collection_estimator->slope();} 332 333 bool old_gen_policy_is_ready() { return _old_gen_policy_is_ready; } 334 335 // Given the amount of live data in the heap, should we 336 // perform a Full GC? 337 bool should_full_GC(size_t live_in_old_gen); 338 339 // Calculates optimial free space sizes for both the old and young 340 // generations. Stores results in _eden_size and _promo_size. 341 // Takes current used space in all generations as input, as well 342 // as an indication if a full gc has just been performed, for use 343 // in deciding if an OOM error should be thrown. 344 void compute_generation_free_space(size_t young_live, 345 size_t eden_live, 346 size_t old_live, 347 size_t cur_eden, // current eden in bytes 348 size_t max_old_gen_size, 349 size_t max_eden_size, 350 bool is_full_gc, 351 GCCause::Cause gc_cause, 352 CollectorPolicy* collector_policy); 353 354 // Calculates new survivor space size; returns a new tenuring threshold 355 // value. Stores new survivor size in _survivor_size. 356 uint compute_survivor_space_size_and_threshold(bool is_survivor_overflow, 357 uint tenuring_threshold, 358 size_t survivor_limit); 359 360 // Return the maximum size of a survivor space if the young generation were of 361 // size gen_size. 362 size_t max_survivor_size(size_t gen_size) { 363 // Never allow the target survivor size to grow more than MinSurvivorRatio 364 // of the young generation size. We cannot grow into a two semi-space | 319 320 LinearLeastSquareFit* major_pause_young_estimator() { 321 return _major_pause_young_estimator; 322 } 323 324 325 virtual void clear_generation_free_space_flags(); 326 327 float major_pause_old_slope() { return _major_pause_old_estimator->slope(); } 328 float major_pause_young_slope() { 329 return _major_pause_young_estimator->slope(); 330 } 331 float major_collection_slope() { return _major_collection_estimator->slope();} 332 333 bool old_gen_policy_is_ready() { return _old_gen_policy_is_ready; } 334 335 // Given the amount of live data in the heap, should we 336 // perform a Full GC? 337 bool should_full_GC(size_t live_in_old_gen); 338 339 // Calculates optimal free space sizes for both the young and tenured 340 // generations. Stores results in _eden_size and _promo_size. 341 // Takes current used space in all generations as input, as well 342 // as an indication if a full gc has just been performed, for use 343 // in deciding if an OOM error should be thrown. 344 void compute_generations_free_space(size_t young_live, 345 size_t eden_live, 346 size_t old_live, 347 size_t cur_eden, // current eden in bytes 348 size_t max_old_gen_size, 349 size_t max_eden_size, 350 bool is_full_gc, 351 GCCause::Cause gc_cause, 352 CollectorPolicy* collector_policy); 353 354 // Calculates new survivor space size; returns a new tenuring threshold 355 // value. Stores new survivor size in _survivor_size. 356 uint compute_survivor_space_size_and_threshold(bool is_survivor_overflow, 357 uint tenuring_threshold, 358 size_t survivor_limit); 359 360 // Return the maximum size of a survivor space if the young generation were of 361 // size gen_size. 362 size_t max_survivor_size(size_t gen_size) { 363 // Never allow the target survivor size to grow more than MinSurvivorRatio 364 // of the young generation size. We cannot grow into a two semi-space |