changeset 10581:c083b12bb8cc

8134749: SoftReferences declared dead too early Reviewed-by: jmasa, tbenson
author pliden
date Fri, 11 Mar 2016 09:09:52 +0100
parents 479321aff3f9
children 3d0716ca86c9
files src/share/vm/gc/shared/referenceProcessor.cpp
diffstat 1 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc/shared/referenceProcessor.cpp	Thu Mar 10 21:57:27 2016 +0000
+++ b/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);
   }