< prev index next >

src/share/vm/gc/g1/youngList.cpp

Print this page
rev 10309 : 8150390: Move rs length sampling data to the sampling thread
Reviewed-by:

@@ -31,13 +31,13 @@
 #include "gc/g1/youngList.hpp"
 #include "logging/log.hpp"
 #include "utilities/ostream.hpp"
 
 YoungList::YoungList(G1CollectedHeap* g1h) :
-    _g1h(g1h), _head(NULL), _length(0), _last_sampled_rs_lengths(0),
+    _g1h(g1h), _head(NULL), _length(0),
     _survivor_head(NULL), _survivor_tail(NULL), _survivor_length(0) {
-  guarantee(check_list_empty(false), "just making sure...");
+  guarantee(check_list_empty(), "just making sure...");
 }
 
 void YoungList::push_region(HeapRegion *hr) {
   assert(!hr->is_young(), "should not already be young");
   assert(hr->get_next_young_region() == NULL, "cause it should!");

@@ -84,13 +84,11 @@
   empty_list(_survivor_head);
   _survivor_head = NULL;
   _survivor_tail = NULL;
   _survivor_length = 0;
 
-  _last_sampled_rs_lengths = 0;
-
-  assert(check_list_empty(false), "just making sure...");
+  assert(check_list_empty(), "just making sure...");
 }
 
 bool YoungList::check_list_well_formed() {
   bool ret = true;
 

@@ -117,21 +115,17 @@
   }
 
   return ret;
 }
 
-bool YoungList::check_list_empty(bool check_sample) {
+bool YoungList::check_list_empty() {
   bool ret = true;
 
   if (_length != 0) {
     log_error(gc, verify)("### YOUNG LIST should have 0 length, not %u", _length);
     ret = false;
   }
-  if (check_sample && _last_sampled_rs_lengths != 0) {
-    log_error(gc, verify)("### YOUNG LIST has non-zero last sampled RS lengths");
-    ret = false;
-  }
   if (_head != NULL) {
     log_error(gc, verify)("### YOUNG LIST does not have a NULL head");
     ret = false;
   }
   if (!ret) {

@@ -140,42 +134,10 @@
 
   return ret;
 }
 
 void
-YoungList::rs_length_sampling_init() {
-  _sampled_rs_lengths = 0;
-  _curr               = _head;
-}
-
-bool
-YoungList::rs_length_sampling_more() {
-  return _curr != NULL;
-}
-
-void
-YoungList::rs_length_sampling_next() {
-  assert( _curr != NULL, "invariant" );
-  size_t rs_length = _curr->rem_set()->occupied();
-
-  _sampled_rs_lengths += rs_length;
-
-  // The current region may not yet have been added to the
-  // incremental collection set (it gets added when it is
-  // retired as the current allocation region).
-  if (_curr->in_collection_set()) {
-    // Update the collection set policy information for this region
-    _g1h->g1_policy()->update_incremental_cset_info(_curr, rs_length);
-  }
-
-  _curr = _curr->get_next_young_region();
-  if (_curr == NULL) {
-    _last_sampled_rs_lengths = _sampled_rs_lengths;
-  }
-}
-
-void
 YoungList::reset_auxilary_lists() {
   guarantee( is_empty(), "young list should be empty" );
   assert(check_list_well_formed(), "young list should be well formed");
 
   // Add survivor regions to SurvRateGroup.
< prev index next >