changeset 30766:8afe4435d599

8058265: No callers of ReferenceProcessor::clear_discovered_references Summary: Removed unused or unneeded code. Reviewed-by: brutisso, jmasa
author kbarrett
date Thu, 14 May 2015 15:17:36 -0400
parents 32398da8ba8f
children 6f7448d79481
files hotspot/src/share/vm/gc/shared/referenceProcessor.cpp hotspot/src/share/vm/gc/shared/referenceProcessor.hpp
diffstat 2 files changed, 1 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/gc/shared/referenceProcessor.cpp	Mon Feb 24 12:49:21 2014 +0100
+++ b/hotspot/src/share/vm/gc/shared/referenceProcessor.cpp	Thu May 14 15:17:36 2015 -0400
@@ -189,7 +189,6 @@
   AbstractRefProcTaskExecutor* task_executor,
   GCTimer*                     gc_timer,
   GCId                         gc_id) {
-  NOT_PRODUCT(verify_ok_to_handle_reflists());
 
   assert(!enqueuing_is_done(), "If here enqueuing should not be complete");
   // Stop treating discovered references specially.
@@ -329,7 +328,6 @@
 }
 
 bool ReferenceProcessor::enqueue_discovered_references(AbstractRefProcTaskExecutor* task_executor) {
-  NOT_PRODUCT(verify_ok_to_handle_reflists());
   if (UseCompressedOops) {
     return enqueue_discovered_ref_helper<narrowOop>(this, task_executor);
   } else {
@@ -651,18 +649,13 @@
   refs_list.set_length(0);
 }
 
-void
-ReferenceProcessor::abandon_partial_discovered_list(DiscoveredList& refs_list) {
-  clear_discovered_references(refs_list);
-}
-
 void ReferenceProcessor::abandon_partial_discovery() {
   // loop over the lists
   for (uint i = 0; i < _max_num_q * number_of_subclasses_of_ref(); i++) {
     if (TraceReferenceGC && PrintGCDetails && ((i % _max_num_q) == 0)) {
       gclog_or_tty->print_cr("\nAbandoning %s discovered list", list_name(i));
     }
-    abandon_partial_discovered_list(_discovered_refs[i]);
+    clear_discovered_references(_discovered_refs[i]);
   }
 }
 
@@ -1160,8 +1153,6 @@
   GCTimer* gc_timer,
   GCId     gc_id) {
 
-  NOT_PRODUCT(verify_ok_to_handle_reflists());
-
   // Soft references
   {
     GCTraceTime tt("Preclean SoftReferences", PrintGCDetails && PrintReferenceGC,
@@ -1297,18 +1288,3 @@
    return NULL;
 }
 
-#ifndef PRODUCT
-void ReferenceProcessor::verify_ok_to_handle_reflists() {
-  // empty for now
-}
-#endif
-
-#ifndef PRODUCT
-void ReferenceProcessor::clear_discovered_references() {
-  guarantee(!_discovering_refs, "Discovering refs?");
-  for (uint i = 0; i < _max_num_q * number_of_subclasses_of_ref(); i++) {
-    clear_discovered_references(_discovered_refs[i]);
-  }
-}
-
-#endif // PRODUCT
--- a/hotspot/src/share/vm/gc/shared/referenceProcessor.hpp	Mon Feb 24 12:49:21 2014 +0100
+++ b/hotspot/src/share/vm/gc/shared/referenceProcessor.hpp	Thu May 14 15:17:36 2015 -0400
@@ -361,10 +361,8 @@
   DiscoveredList* get_discovered_list(ReferenceType rt);
   inline void add_to_discovered_list_mt(DiscoveredList& refs_list, oop obj,
                                         HeapWord* discovered_addr);
-  void verify_ok_to_handle_reflists() PRODUCT_RETURN;
 
   void clear_discovered_references(DiscoveredList& refs_list);
-  void abandon_partial_discovered_list(DiscoveredList& refs_list);
 
   // Calculate the number of jni handles.
   unsigned int count_jni_refs();
@@ -457,9 +455,6 @@
   // debugging
   void verify_no_references_recorded() PRODUCT_RETURN;
   void verify_referent(oop obj)        PRODUCT_RETURN;
-
-  // clear the discovered lists (unlinking each entry).
-  void clear_discovered_references() PRODUCT_RETURN;
 };
 
 // A utility class to disable reference discovery in