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
--- 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