8293622: Cleanup use of G1ConcRefinementThreads

Reviewed-by: ayang, iwalulya
This commit is contained in:
Lei Zaakjyu 2023-12-13 11:18:38 +00:00 committed by Albert Mingkun Yang
parent f573f6d233
commit 493b5bd2fd
4 changed files with 3 additions and 10 deletions

@ -175,7 +175,7 @@ G1ConcurrentRefine::G1ConcurrentRefine(G1Policy* policy) :
{}
jint G1ConcurrentRefine::initialize() {
return _thread_control.initialize(this, max_num_threads());
return _thread_control.initialize(this, G1ConcRefinementThreads);
}
G1ConcurrentRefine* G1ConcurrentRefine::create(G1Policy* policy, jint* ecode) {
@ -199,10 +199,6 @@ void G1ConcurrentRefine::threads_do(ThreadClosure *tc) {
_thread_control.worker_threads_do(tc);
}
uint G1ConcurrentRefine::max_num_threads() {
return G1ConcRefinementThreads;
}
void G1ConcurrentRefine::update_pending_cards_target(double logged_cards_time_ms,
size_t processed_logged_cards,
size_t predicted_thread_buffer_cards,

@ -215,9 +215,6 @@ public:
// Iterate over all concurrent refinement threads applying the given closure.
void threads_do(ThreadClosure *tc);
// Maximum number of refinement threads.
static uint max_num_threads();
};
#endif // SHARE_GC_G1_G1CONCURRENTREFINE_HPP

@ -81,7 +81,7 @@ void G1FromCardCache::print(outputStream* out) {
#endif
uint G1FromCardCache::num_par_rem_sets() {
return G1DirtyCardQueueSet::num_par_ids() + G1ConcurrentRefine::max_num_threads() + MAX2(ConcGCThreads, ParallelGCThreads);
return G1DirtyCardQueueSet::num_par_ids() + G1ConcRefinementThreads + MAX2(ConcGCThreads, ParallelGCThreads);
}
void G1FromCardCache::clear(uint region_idx) {

@ -67,7 +67,7 @@ double G1RemSetSummary::rs_thread_vtime(uint thread) const {
}
G1RemSetSummary::G1RemSetSummary(bool should_update) :
_num_vtimes(G1ConcurrentRefine::max_num_threads()),
_num_vtimes(G1ConcRefinementThreads),
_rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)) {
memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes);