1.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp Wed May 15 11:05:09 2013 +0200 1.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp Wed May 15 10:41:22 2013 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -136,18 +136,24 @@ 1.11 double gc_minor_pause_goal_sec() const { return _gc_minor_pause_goal_sec; } 1.12 1.13 // Change the young generation size to achieve a minor GC pause time goal 1.14 - void adjust_for_minor_pause_time(bool is_full_gc, 1.15 + void adjust_promo_for_minor_pause_time(bool is_full_gc, 1.16 size_t* desired_promo_size_ptr, 1.17 size_t* desired_eden_size_ptr); 1.18 + void adjust_eden_for_minor_pause_time(bool is_full_gc, 1.19 + size_t* desired_eden_size_ptr); 1.20 // Change the generation sizes to achieve a GC pause time goal 1.21 // Returned sizes are not necessarily aligned. 1.22 - void adjust_for_pause_time(bool is_full_gc, 1.23 + void adjust_promo_for_pause_time(bool is_full_gc, 1.24 + size_t* desired_promo_size_ptr, 1.25 + size_t* desired_eden_size_ptr); 1.26 + void adjust_eden_for_pause_time(bool is_full_gc, 1.27 size_t* desired_promo_size_ptr, 1.28 size_t* desired_eden_size_ptr); 1.29 // Change the generation sizes to achieve an application throughput goal 1.30 // Returned sizes are not necessarily aligned. 1.31 - void adjust_for_throughput(bool is_full_gc, 1.32 - size_t* desired_promo_size_ptr, 1.33 + void adjust_promo_for_throughput(bool is_full_gc, 1.34 + size_t* desired_promo_size_ptr); 1.35 + void adjust_eden_for_throughput(bool is_full_gc, 1.36 size_t* desired_eden_size_ptr); 1.37 // Change the generation sizes to achieve minimum footprint 1.38 // Returned sizes are not aligned. 1.39 @@ -168,9 +174,6 @@ 1.40 size_t promo_decrement_aligned_down(size_t cur_promo); 1.41 size_t promo_increment_with_supplement_aligned_up(size_t cur_promo); 1.42 1.43 - // Decay the supplemental growth additive. 1.44 - void decay_supplemental_growth(bool is_full_gc); 1.45 - 1.46 // Returns a change that has been scaled down. Result 1.47 // is not aligned. (If useful, move to some shared 1.48 // location.) 1.49 @@ -336,7 +339,7 @@ 1.50 // perform a Full GC? 1.51 bool should_full_GC(size_t live_in_old_gen); 1.52 1.53 - // Calculates optimial free space sizes for both the old and young 1.54 + // Calculates optimal (free) space sizes for both the young and old 1.55 // generations. Stores results in _eden_size and _promo_size. 1.56 // Takes current used space in all generations as input, as well 1.57 // as an indication if a full gc has just been performed, for use 1.58 @@ -347,9 +350,18 @@ 1.59 size_t cur_eden, // current eden in bytes 1.60 size_t max_old_gen_size, 1.61 size_t max_eden_size, 1.62 - bool is_full_gc, 1.63 - GCCause::Cause gc_cause, 1.64 - CollectorPolicy* collector_policy); 1.65 + bool is_full_gc); 1.66 + 1.67 + void compute_eden_space_size(size_t young_live, 1.68 + size_t eden_live, 1.69 + size_t cur_eden, // current eden in bytes 1.70 + size_t max_eden_size, 1.71 + bool is_full_gc); 1.72 + 1.73 + void compute_old_gen_free_space(size_t old_live, 1.74 + size_t cur_eden, // current eden in bytes 1.75 + size_t max_old_gen_size, 1.76 + bool is_full_gc); 1.77 1.78 // Calculates new survivor space size; returns a new tenuring threshold 1.79 // value. Stores new survivor size in _survivor_size. 1.80 @@ -390,6 +402,9 @@ 1.81 1.82 // Printing support 1.83 virtual bool print_adaptive_size_policy_on(outputStream* st) const; 1.84 + 1.85 + // Decay the supplemental growth additive. 1.86 + void decay_supplemental_growth(bool is_full_gc); 1.87 }; 1.88 1.89 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSADAPTIVESIZEPOLICY_HPP