8071507: (ref) Clear phantom reference as soft and weak references do
authorkbarrett
Mon, 28 Dec 2015 13:48:43 -0500
changeset 35225 2b16576599d7
parent 35224 e723bb1c6ef9
child 35226 4aee3c29fc2d
8071507: (ref) Clear phantom reference as soft and weak references do Summary: GC clears phantom refs on notification; update spec accordingly. Reviewed-by: mchung, jmasa
hotspot/src/share/vm/gc/shared/referenceProcessor.cpp
--- a/hotspot/src/share/vm/gc/shared/referenceProcessor.cpp	Thu Dec 24 07:35:18 2015 -0800
+++ b/hotspot/src/share/vm/gc/shared/referenceProcessor.cpp	Mon Dec 28 13:48:43 2015 -0500
@@ -235,7 +235,7 @@
 
   // Final references
   {
-  GCTraceTime(Debug, gc, ref) tt("FinalReference", gc_timer);
+    GCTraceTime(Debug, gc, ref) tt("FinalReference", gc_timer);
     process_discovered_reflist(_discoveredFinalRefs, NULL, false,
                                is_alive, keep_alive, complete_gc, task_executor);
   }
@@ -243,7 +243,7 @@
   // Phantom references
   {
     GCTraceTime(Debug, gc, ref) tt("PhantomReference", gc_timer);
-    process_discovered_reflist(_discoveredPhantomRefs, NULL, false,
+    process_discovered_reflist(_discoveredPhantomRefs, NULL, true,
                                is_alive, keep_alive, complete_gc, task_executor);
 
     // Process cleaners, but include them in phantom timing.  We expect