8201365: Remove G1Policy::should_process_references()
authortschatzl
Wed, 11 Apr 2018 11:37:19 +0200
changeset 49743 b2da6c360225
parent 49742 1196aa0be8be
child 49744 5dcc893ad119
8201365: Remove G1Policy::should_process_references() Reviewed-by: shade
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
src/hotspot/share/gc/g1/g1Policy.hpp
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Wed Apr 11 09:47:41 2018 +0200
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Wed Apr 11 11:37:19 2018 +0200
@@ -2840,11 +2840,7 @@
       // reference processing currently works in G1.
 
       // Enable discovery in the STW reference processor
-      if (g1_policy()->should_process_references()) {
-        ref_processor_stw()->enable_discovery();
-      } else {
-        ref_processor_stw()->disable_discovery();
-      }
+      ref_processor_stw()->enable_discovery();
 
       {
         // We want to temporarily turn off discovery by the
@@ -4193,12 +4189,8 @@
   // as we may have to copy some 'reachable' referent
   // objects (and their reachable sub-graphs) that were
   // not copied during the pause.
-  if (g1_policy()->should_process_references()) {
-    preserve_cm_referents(per_thread_states);
-    process_discovered_references(per_thread_states);
-  } else {
-    ref_processor_stw()->verify_no_references_recorded();
-  }
+  preserve_cm_referents(per_thread_states);
+  process_discovered_references(per_thread_states);
 
   G1STWIsAliveClosure is_alive(this);
   G1KeepAliveClosure keep_alive(this);
@@ -4241,11 +4233,7 @@
   // will log these updates (and dirty their associated
   // cards). We need these updates logged to update any
   // RSets.
-  if (g1_policy()->should_process_references()) {
-    enqueue_discovered_references(per_thread_states);
-  } else {
-    g1_policy()->phase_times()->record_ref_enq_time(0);
-  }
+  enqueue_discovered_references(per_thread_states);
 
   _allocator->release_gc_alloc_regions(evacuation_info);
 
--- a/src/hotspot/share/gc/g1/g1Policy.hpp	Wed Apr 11 09:47:41 2018 +0200
+++ b/src/hotspot/share/gc/g1/g1Policy.hpp	Wed Apr 11 11:37:19 2018 +0200
@@ -383,10 +383,6 @@
 
   bool adaptive_young_list_length() const;
 
-  bool should_process_references() const {
-    return true;
-  }
-
   void transfer_survivors_to_cset(const G1SurvivorRegions* survivors);
 
 private: