Skip to content

Commit

Permalink
8277556: Call ReferenceProcessorPhaseTimes::set_processing_is_mt once
Browse files Browse the repository at this point in the history
Reviewed-by: sjohanss, tschatzl
  • Loading branch information
albertnetymk committed Nov 23, 2021
1 parent 79350b9 commit 017df14
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/hotspot/share/gc/shared/referenceProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ ReferenceProcessorStats ReferenceProcessor::process_discovered_references(RefPro

update_soft_ref_master_clock();

phase_times.set_processing_is_mt(processing_is_mt());

{
RefProcTotalPhaseTimesTracker tt(SoftWeakFinalRefsPhase, &phase_times);
process_soft_weak_final_refs(proxy_task, phase_times);
Expand Down Expand Up @@ -730,8 +732,6 @@ void ReferenceProcessor::process_soft_weak_final_refs(RefProcProxyTask& proxy_ta
phase_times.set_ref_discovered(REF_WEAK, num_weak_refs);
phase_times.set_ref_discovered(REF_FINAL, num_final_refs);

phase_times.set_processing_is_mt(processing_is_mt());

if (num_total_refs == 0) {
log_debug(gc, ref)("Skipped SoftWeakFinalRefsPhase of Reference Processing: no references");
return;
Expand Down Expand Up @@ -764,7 +764,6 @@ void ReferenceProcessor::process_final_keep_alive(RefProcProxyTask& proxy_task,
ReferenceProcessorPhaseTimes& phase_times) {

size_t const num_final_refs = total_count(_discoveredFinalRefs);
phase_times.set_processing_is_mt(processing_is_mt());

if (num_final_refs == 0) {
log_debug(gc, ref)("Skipped KeepAliveFinalRefsPhase of Reference Processing: no references");
Expand All @@ -791,7 +790,6 @@ void ReferenceProcessor::process_phantom_refs(RefProcProxyTask& proxy_task,

size_t const num_phantom_refs = total_count(_discoveredPhantomRefs);
phase_times.set_ref_discovered(REF_PHANTOM, num_phantom_refs);
phase_times.set_processing_is_mt(processing_is_mt());

if (num_phantom_refs == 0) {
log_debug(gc, ref)("Skipped PhantomRefsPhase of Reference Processing: no references");
Expand Down

1 comment on commit 017df14

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.