comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp @ 20655:b840813adfcc

8065305: Make it possible to extend the G1CollectorPolicy Summary: Added a G1CollectorPolicyExt where it is possible to extend the class. Reviewed-by: sjohanss, tschatzl
author jwilhelm
date Fri, 21 Nov 2014 12:08:37 +0100
parents c02ec279b062
children 7848fc12602b
comparison
equal deleted inserted replaced
20654:fa6adc194d48 20655:b840813adfcc
24 24
25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTORPOLICY_HPP 25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTORPOLICY_HPP
26 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTORPOLICY_HPP 26 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTORPOLICY_HPP
27 27
28 #include "gc_implementation/g1/collectionSetChooser.hpp" 28 #include "gc_implementation/g1/collectionSetChooser.hpp"
29 #include "gc_implementation/g1/g1Allocator.hpp"
29 #include "gc_implementation/g1/g1MMUTracker.hpp" 30 #include "gc_implementation/g1/g1MMUTracker.hpp"
30 #include "memory/collectorPolicy.hpp" 31 #include "memory/collectorPolicy.hpp"
31 32
32 // A G1CollectorPolicy makes policy decisions that determine the 33 // A G1CollectorPolicy makes policy decisions that determine the
33 // characteristics of the collector. Examples include: 34 // characteristics of the collector. Examples include:
801 // the initial-mark work and start a marking cycle. 802 // the initial-mark work and start a marking cycle.
802 void decide_on_conc_mark_initiation(); 803 void decide_on_conc_mark_initiation();
803 804
804 // If an expansion would be appropriate, because recent GC overhead had 805 // If an expansion would be appropriate, because recent GC overhead had
805 // exceeded the desired limit, return an amount to expand by. 806 // exceeded the desired limit, return an amount to expand by.
806 size_t expansion_amount(); 807 virtual size_t expansion_amount();
807 808
808 // Print tracing information. 809 // Print tracing information.
809 void print_tracing_info() const; 810 void print_tracing_info() const;
810 811
811 // Print stats on young survival ratio 812 // Print stats on young survival ratio
820 // do that for any other surv rate groups 821 // do that for any other surv rate groups
821 } 822 }
822 823
823 size_t young_list_target_length() const { return _young_list_target_length; } 824 size_t young_list_target_length() const { return _young_list_target_length; }
824 825
825 bool is_young_list_full() { 826 bool is_young_list_full();
826 uint young_list_length = _g1->young_list()->length(); 827
827 uint young_list_target_length = _young_list_target_length; 828 bool can_expand_young_list();
828 return young_list_length >= young_list_target_length;
829 }
830
831 bool can_expand_young_list() {
832 uint young_list_length = _g1->young_list()->length();
833 uint young_list_max_length = _young_list_max_length;
834 return young_list_length < young_list_max_length;
835 }
836 829
837 uint young_list_max_length() { 830 uint young_list_max_length() {
838 return _young_list_max_length; 831 return _young_list_max_length;
839 } 832 }
840 833