Skip to content

Commit 493b5bd

Browse files
LizBingalbertnetymk
authored andcommittedDec 13, 2023
8293622: Cleanup use of G1ConcRefinementThreads
Reviewed-by: ayang, iwalulya
1 parent f573f6d commit 493b5bd

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed
 

‎src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ G1ConcurrentRefine::G1ConcurrentRefine(G1Policy* policy) :
175175
{}
176176

177177
jint G1ConcurrentRefine::initialize() {
178-
return _thread_control.initialize(this, max_num_threads());
178+
return _thread_control.initialize(this, G1ConcRefinementThreads);
179179
}
180180

181181
G1ConcurrentRefine* G1ConcurrentRefine::create(G1Policy* policy, jint* ecode) {
@@ -199,10 +199,6 @@ void G1ConcurrentRefine::threads_do(ThreadClosure *tc) {
199199
_thread_control.worker_threads_do(tc);
200200
}
201201

202-
uint G1ConcurrentRefine::max_num_threads() {
203-
return G1ConcRefinementThreads;
204-
}
205-
206202
void G1ConcurrentRefine::update_pending_cards_target(double logged_cards_time_ms,
207203
size_t processed_logged_cards,
208204
size_t predicted_thread_buffer_cards,

‎src/hotspot/share/gc/g1/g1ConcurrentRefine.hpp

-3
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,6 @@ class G1ConcurrentRefine : public CHeapObj<mtGC> {
215215

216216
// Iterate over all concurrent refinement threads applying the given closure.
217217
void threads_do(ThreadClosure *tc);
218-
219-
// Maximum number of refinement threads.
220-
static uint max_num_threads();
221218
};
222219

223220
#endif // SHARE_GC_G1_G1CONCURRENTREFINE_HPP

‎src/hotspot/share/gc/g1/g1FromCardCache.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void G1FromCardCache::print(outputStream* out) {
8181
#endif
8282

8383
uint G1FromCardCache::num_par_rem_sets() {
84-
return G1DirtyCardQueueSet::num_par_ids() + G1ConcurrentRefine::max_num_threads() + MAX2(ConcGCThreads, ParallelGCThreads);
84+
return G1DirtyCardQueueSet::num_par_ids() + G1ConcRefinementThreads + MAX2(ConcGCThreads, ParallelGCThreads);
8585
}
8686

8787
void G1FromCardCache::clear(uint region_idx) {

‎src/hotspot/share/gc/g1/g1RemSetSummary.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ double G1RemSetSummary::rs_thread_vtime(uint thread) const {
6767
}
6868

6969
G1RemSetSummary::G1RemSetSummary(bool should_update) :
70-
_num_vtimes(G1ConcurrentRefine::max_num_threads()),
70+
_num_vtimes(G1ConcRefinementThreads),
7171
_rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)) {
7272

7373
memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes);

0 commit comments

Comments
 (0)
Please sign in to comment.