diff src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 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
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Wed Nov 19 14:21:09 2014 -0800
+++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Fri Nov 21 12:08:37 2014 +0100
@@ -1425,6 +1425,18 @@
 #endif // PRODUCT
 }
 
+bool G1CollectorPolicy::is_young_list_full() {
+  uint young_list_length = _g1->young_list()->length();
+  uint young_list_target_length = _young_list_target_length;
+  return young_list_length >= young_list_target_length;
+}
+
+bool G1CollectorPolicy::can_expand_young_list() {
+  uint young_list_length = _g1->young_list()->length();
+  uint young_list_max_length = _young_list_max_length;
+  return young_list_length < young_list_max_length;
+}
+
 uint G1CollectorPolicy::max_regions(int purpose) {
   switch (purpose) {
     case GCAllocForSurvived: