equal
deleted
inserted
replaced
112 tc->do_thread(_threads[i]); |
112 tc->do_thread(_threads[i]); |
113 } |
113 } |
114 } |
114 } |
115 } |
115 } |
116 |
116 |
|
117 void ConcurrentG1Refine::worker_threads_do(ThreadClosure * tc) { |
|
118 if (_threads != NULL) { |
|
119 for (int i = 0; i < worker_thread_num(); i++) { |
|
120 tc->do_thread(_threads[i]); |
|
121 } |
|
122 } |
|
123 } |
|
124 |
117 int ConcurrentG1Refine::thread_num() { |
125 int ConcurrentG1Refine::thread_num() { |
118 int n_threads = (G1ConcRefinementThreads > 0) ? G1ConcRefinementThreads |
126 int n_threads = (G1ConcRefinementThreads > 0) ? G1ConcRefinementThreads |
119 : ParallelGCThreads; |
127 : ParallelGCThreads; |
120 return MAX2<int>(n_threads, 1); |
128 return MAX2<int>(n_threads, 1); |
121 } |
129 } |
124 for (int i = 0; i < _n_threads; ++i) { |
132 for (int i = 0; i < _n_threads; ++i) { |
125 _threads[i]->print_on(st); |
133 _threads[i]->print_on(st); |
126 st->cr(); |
134 st->cr(); |
127 } |
135 } |
128 } |
136 } |
|
137 |
|
138 ConcurrentG1RefineThread * ConcurrentG1Refine::sampling_thread() const { |
|
139 return _threads[worker_thread_num()]; |
|
140 } |