src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp

Print this page

        

@@ -112,10 +112,18 @@
       tc->do_thread(_threads[i]);
     }
   }
 }
 
+void ConcurrentG1Refine::worker_threads_do(ThreadClosure * tc) {
+  if (_threads != NULL) {
+    for (int i = 0; i < _n_worker_threads; i++) {
+      tc->do_thread(_threads[i]);
+    }
+  }
+}
+
 int ConcurrentG1Refine::thread_num() {
   int n_threads = (G1ConcRefinementThreads > 0) ? G1ConcRefinementThreads
                                                 : ParallelGCThreads;
   return MAX2<int>(n_threads, 1);
 }

@@ -124,5 +132,9 @@
   for (int i = 0; i < _n_threads; ++i) {
     _threads[i]->print_on(st);
     st->cr();
   }
 }
+
+ConcurrentG1RefineThread * ConcurrentG1Refine::sampling_thread() const {
+  return _threads[_n_threads - 1];
+}