hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp
changeset 17854 d65bc1546091
parent 17327 4bd0581aa231
child 22220 eb467dfb9585
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp	Sat Jun 01 10:00:56 2013 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp	Tue May 28 09:32:06 2013 +0200
@@ -114,6 +114,14 @@
   }
 }
 
+void ConcurrentG1Refine::worker_threads_do(ThreadClosure * tc) {
+  if (_threads != NULL) {
+    for (int i = 0; i < worker_thread_num(); i++) {
+      tc->do_thread(_threads[i]);
+    }
+  }
+}
+
 int ConcurrentG1Refine::thread_num() {
   int n_threads = (G1ConcRefinementThreads > 0) ? G1ConcRefinementThreads
                                                 : ParallelGCThreads;
@@ -126,3 +134,7 @@
     st->cr();
   }
 }
+
+ConcurrentG1RefineThread * ConcurrentG1Refine::sampling_thread() const {
+  return _threads[worker_thread_num()];
+}