Skip to content
Permalink
Browse files
8266073: Regression ~2% in Derby after 8261804
Reviewed-by: ayang, sjohanss
  • Loading branch information
lkorinth committed May 17, 2021
1 parent 02f895c commit f4227879b0504bc4656bd84153b13b04c007aa66
@@ -1562,15 +1562,9 @@ void G1ConcurrentMark::weak_refs_work(bool clear_all_soft_refs) {
// is not multi-threaded we use the current (VMThread) thread,
// otherwise we use the work gang from the G1CollectedHeap and
// we utilize all the worker threads we can.
bool processing_is_mt = rp->processing_is_mt();
uint active_workers = (processing_is_mt ? _g1h->workers()->active_workers() : 1U);
uint active_workers = (ParallelRefProcEnabled ? _g1h->workers()->active_workers() : 1U);
active_workers = clamp(active_workers, 1u, _max_num_tasks);

// Parallel processing task executor.
G1CMRefProcTaskExecutor par_task_executor(_g1h, this,
_g1h->workers(), active_workers);
AbstractRefProcTaskExecutor* executor = (processing_is_mt ? &par_task_executor : NULL);

// Set the concurrency level. The phase was already set prior to
// executing the remark task.
set_concurrency(active_workers);
@@ -1581,6 +1575,11 @@ void G1ConcurrentMark::weak_refs_work(bool clear_all_soft_refs) {
// Reference lists are balanced (see balance_all_queues() and balance_queues()).
rp->set_active_mt_degree(active_workers);

// Parallel processing task executor.
G1CMRefProcTaskExecutor par_task_executor(_g1h, this,
_g1h->workers(), active_workers);
AbstractRefProcTaskExecutor* executor = (rp->processing_is_mt() ? &par_task_executor : NULL);

ReferenceProcessorPhaseTimes pt(_gc_timer_cm, rp->max_num_queues());

// Process the weak references.
@@ -37,15 +37,11 @@ G1FullGCReferenceProcessingExecutor::G1FullGCReferenceProcessingExecutor(G1FullC
_collector(collector),
_reference_processor(collector->reference_processor()),
_old_mt_degree(_reference_processor->num_queues()) {
if (_reference_processor->processing_is_mt()) {
_reference_processor->set_active_mt_degree(_collector->workers());
}
_reference_processor->set_active_mt_degree(_collector->workers());
}

G1FullGCReferenceProcessingExecutor::~G1FullGCReferenceProcessingExecutor() {
if (_reference_processor->processing_is_mt()) {
_reference_processor->set_active_mt_degree(_old_mt_degree);
}
_reference_processor->set_active_mt_degree(_old_mt_degree);
}

G1FullGCReferenceProcessingExecutor::G1RefProcTaskProxy::G1RefProcTaskProxy(ProcessTask& proc_task,
@@ -2125,9 +2125,8 @@ void PSParallelCompact::marking_phase(ParCompactionManager* cm,
ReferenceProcessorStats stats;
ReferenceProcessorPhaseTimes pt(&_gc_timer, ref_processor()->max_num_queues());

ref_processor()->set_active_mt_degree(active_gc_threads);
if (ref_processor()->processing_is_mt()) {
ref_processor()->set_active_mt_degree(active_gc_threads);

RefProcTaskExecutor task_executor;
stats = ref_processor()->process_discovered_references(
is_alive_closure(), &mark_and_push_closure, &follow_stack_closure,
@@ -1373,7 +1373,7 @@ RefProcMTDegreeAdjuster::RefProcMTDegreeAdjuster(ReferenceProcessor* rp,
size_t ref_count):
_rp(rp),
_saved_num_queues(_rp->num_queues()) {
if (!_rp->processing_is_mt() || !_rp->adjust_no_of_processing_threads() || (ReferencesPerThread == 0)) {
if (!_rp->adjust_no_of_processing_threads() || (ReferencesPerThread == 0)) {
return;
}

1 comment on commit f422787

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on f422787 May 17, 2021

Please sign in to comment.