8271163: G1 uses wrong degree of MT processing since JDK-8270169

Reviewed-by: kbarrett, ayang
This commit is contained in:
Thomas Schatzl 2021-07-23 11:56:52 +00:00
parent 8a789b71fe
commit 8c8e3a0df2

View File

@ -1848,8 +1848,10 @@ void G1CollectedHeap::ref_processing_init() {
_ref_processor_cm =
new ReferenceProcessor(&_is_subject_to_discovery_cm,
ParallelGCThreads, // degree of mt processing
(ConcGCThreads > 1), // mt discovery
ConcGCThreads, // degree of mt discovery
// We discover with the gc worker threads during Remark, so both
// thread counts must be considered for discovery.
(ParallelGCThreads > 1) || (ConcGCThreads > 1), // mt discovery
MAX2(ParallelGCThreads, ConcGCThreads), // degree of mt discovery
false, // Reference discovery is not atomic
&_is_alive_closure_cm); // is alive closure