Skip to content
Permalink
Browse files
8241142: Shenandoah: should not use parallel reference processing wit…
…h single GC thread

Reviewed-by: shade
  • Loading branch information
adityamandaleeka authored and shipilev committed Apr 14, 2020
1 parent a62a0e5 commit e969c158d8024d98cf1e29a22dd6c94839d04395
Showing 1 changed file with 9 additions and 3 deletions.
@@ -487,7 +487,6 @@ ShenandoahHeap::ShenandoahHeap(ShenandoahCollectorPolicy* policy) :
_heap = this;

log_info(gc, init)("GC threads: " UINT32_FORMAT " parallel, " UINT32_FORMAT " concurrent", ParallelGCThreads, ConcGCThreads);
log_info(gc, init)("Reference processing: %s", ParallelRefProcEnabled ? "parallel" : "serial");

BarrierSet::set_barrier_set(new ShenandoahBarrierSet(this));

@@ -2026,16 +2025,23 @@ void ShenandoahHeap::set_concurrent_root_in_progress(bool in_progress) {
void ShenandoahHeap::ref_processing_init() {
assert(_max_workers > 0, "Sanity");

bool mt_processing = ParallelRefProcEnabled && (ParallelGCThreads > 1);
bool mt_discovery = _max_workers > 1;

_ref_processor =
new ReferenceProcessor(&_subject_to_discovery, // is_subject_to_discovery
ParallelRefProcEnabled, // MT processing
mt_processing, // MT processing
_max_workers, // Degree of MT processing
true, // MT discovery
mt_discovery, // MT discovery
_max_workers, // Degree of MT discovery
false, // Reference discovery is not atomic
NULL, // No closure, should be installed before use
true); // Scale worker threads

log_info(gc, init)("Reference processing: %s discovery, %s processing",
mt_discovery ? "parallel" : "serial",
mt_processing ? "parallel" : "serial");

shenandoah_assert_rp_isalive_not_installed();
}

0 comments on commit e969c15

Please sign in to comment.