8134749: SoftReferences declared dead too early
authorpliden
Fri, 11 Mar 2016 09:09:52 +0100
changeset 37067 1d728037b6a6
parent 37066 f4ebb8b35388
child 37069 732328249e62
8134749: SoftReferences declared dead too early Reviewed-by: jmasa, tbenson
hotspot/src/share/vm/gc/shared/referenceProcessor.cpp
--- a/hotspot/src/share/vm/gc/shared/referenceProcessor.cpp	Thu Mar 10 21:57:27 2016 +0000
+++ b/hotspot/src/share/vm/gc/shared/referenceProcessor.cpp	Fri Mar 11 09:09:52 2016 +0100
@@ -645,9 +645,7 @@
                     OopClosure& keep_alive,
                     VoidClosure& complete_gc)
   {
-    Thread* thr = Thread::current();
-    int refs_list_index = ((WorkerThread*)thr)->id();
-    _ref_processor.process_phase1(_refs_lists[refs_list_index], _policy,
+    _ref_processor.process_phase1(_refs_lists[i], _policy,
                                   &is_alive, &keep_alive, &complete_gc);
   }
 private:
@@ -683,11 +681,6 @@
                     OopClosure& keep_alive,
                     VoidClosure& complete_gc)
   {
-    // Don't use "refs_list_index" calculated in this way because
-    // balance_queues() has moved the Ref's into the first n queues.
-    // Thread* thr = Thread::current();
-    // int refs_list_index = ((WorkerThread*)thr)->id();
-    // _ref_processor.process_phase3(_refs_lists[refs_list_index], _clear_referent,
     _ref_processor.process_phase3(_refs_lists[i], _clear_referent,
                                   &is_alive, &keep_alive, &complete_gc);
   }