< prev index next >

src/share/vm/gc/shared/referenceProcessor.cpp

Print this page
rev 9820 : imported patch cleaner-cleanup

@@ -117,11 +117,10 @@
   }
   _discoveredSoftRefs    = &_discovered_refs[0];
   _discoveredWeakRefs    = &_discoveredSoftRefs[_max_num_q];
   _discoveredFinalRefs   = &_discoveredWeakRefs[_max_num_q];
   _discoveredPhantomRefs = &_discoveredFinalRefs[_max_num_q];
-  _discoveredCleanerRefs = &_discoveredPhantomRefs[_max_num_q];
 
   // Initialize all entries to NULL
   for (uint i = 0; i < _max_num_q * number_of_subclasses_of_ref(); i++) {
     _discovered_refs[i].set_head(NULL);
     _discovered_refs[i].set_length(0);

@@ -206,18 +205,15 @@
   // here so that we use the new value during processing of the
   // discovered soft refs.
 
   _soft_ref_timestamp_clock = java_lang_ref_SoftReference::clock();
 
-  // Include cleaners in phantom statistics.  We expect Cleaner
-  // references to be temporary, and don't want to deal with
-  // possible incompatibilities arising from making it more visible.
   ReferenceProcessorStats stats(
       total_count(_discoveredSoftRefs),
       total_count(_discoveredWeakRefs),
       total_count(_discoveredFinalRefs),
-      total_count(_discoveredPhantomRefs) + total_count(_discoveredCleanerRefs));
+      total_count(_discoveredPhantomRefs));
 
   // Soft references
   {
     GCTraceTime(Debug, gc, ref) tt("SoftReference", gc_timer);
     process_discovered_reflist(_discoveredSoftRefs, _current_soft_ref_policy, true,

@@ -243,16 +239,10 @@
   // Phantom references
   {
     GCTraceTime(Debug, gc, ref) tt("PhantomReference", gc_timer);
     process_discovered_reflist(_discoveredPhantomRefs, NULL, true,
                                is_alive, keep_alive, complete_gc, task_executor);
-
-    // Process cleaners, but include them in phantom timing.  We expect
-    // Cleaner references to be temporary, and don't want to deal with
-    // possible incompatibilities arising from making it more visible.
-    process_discovered_reflist(_discoveredCleanerRefs, NULL, true,
-                                 is_alive, keep_alive, complete_gc, task_executor);
   }
 
   // Weak global JNI references. It would make more sense (semantically) to
   // traverse these simultaneously with the regular weak references above, but
   // that is not how the JDK1.2 specification is. See #4126360. Native code can

@@ -805,11 +795,10 @@
 void ReferenceProcessor::balance_all_queues() {
   balance_queues(_discoveredSoftRefs);
   balance_queues(_discoveredWeakRefs);
   balance_queues(_discoveredFinalRefs);
   balance_queues(_discoveredPhantomRefs);
-  balance_queues(_discoveredCleanerRefs);
 }
 
 void ReferenceProcessor::process_discovered_reflist(
   DiscoveredList               refs_lists[],
   ReferencePolicy*             policy,

@@ -910,13 +899,10 @@
       list = &_discoveredFinalRefs[id];
       break;
     case REF_PHANTOM:
       list = &_discoveredPhantomRefs[id];
       break;
-    case REF_CLEANER:
-      list = &_discoveredCleanerRefs[id];
-      break;
     case REF_NONE:
       // we should not reach here if we are an InstanceRefKlass
     default:
       ShouldNotReachHere();
   }

@@ -1160,21 +1146,10 @@
         return;
       }
       preclean_discovered_reflist(_discoveredPhantomRefs[i], is_alive,
                                   keep_alive, complete_gc, yield);
     }
-
-    // Cleaner references.  Included in timing for phantom references.  We
-    // expect Cleaner references to be temporary, and don't want to deal with
-    // possible incompatibilities arising from making it more visible.
-    for (uint i = 0; i < _max_num_q; i++) {
-      if (yield->should_return()) {
-        return;
-      }
-      preclean_discovered_reflist(_discoveredCleanerRefs[i], is_alive,
-                                  keep_alive, complete_gc, yield);
-    }
   }
 }
 
 // Walk the given discovered ref list, and remove all reference objects
 // whose referents are still alive, whose referents are NULL or which

@@ -1236,11 +1211,10 @@
    switch (j) {
      case 0: return "SoftRef";
      case 1: return "WeakRef";
      case 2: return "FinalRef";
      case 3: return "PhantomRef";
-     case 4: return "CleanerRef";
    }
    ShouldNotReachHere();
    return NULL;
 }
 
< prev index next >