From c669aed91c04fe60e09cad0aadf7cff1220521ac Mon Sep 17 00:00:00 2001 From: Lei Zaakjyu Date: Tue, 12 Dec 2023 18:04:38 +0800 Subject: [PATCH] cleanup use of 'G1ConcRefinementThreads' --- src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp | 4 ---- src/hotspot/share/gc/g1/g1FromCardCache.cpp | 2 +- src/hotspot/share/gc/g1/g1RemSetSummary.cpp | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp b/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp index aebdd2c43f5a1..38b5cd5473d33 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp @@ -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, diff --git a/src/hotspot/share/gc/g1/g1FromCardCache.cpp b/src/hotspot/share/gc/g1/g1FromCardCache.cpp index d3e7af768b5a0..062130f40ab7f 100644 --- a/src/hotspot/share/gc/g1/g1FromCardCache.cpp +++ b/src/hotspot/share/gc/g1/g1FromCardCache.cpp @@ -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) { diff --git a/src/hotspot/share/gc/g1/g1RemSetSummary.cpp b/src/hotspot/share/gc/g1/g1RemSetSummary.cpp index cedbefe1fe86b..4156e85fbfa00 100644 --- a/src/hotspot/share/gc/g1/g1RemSetSummary.cpp +++ b/src/hotspot/share/gc/g1/g1RemSetSummary.cpp @@ -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);