From e33031b850dfd2daacb5ccf2bda265edec3ffe50 Mon Sep 17 00:00:00 2001 From: William Kemper Date: Fri, 12 Jan 2024 17:04:51 +0000 Subject: [PATCH] 8323629: Shenandoah: Fix missing include and declaration Reviewed-by: ysr, kdnilsen, phh --- .../gc/shenandoah/shenandoahConcurrentGC.cpp | 20 ++++++++++++++----- .../share/gc/shenandoah/shenandoahPacer.hpp | 1 + .../gc/shenandoah/shenandoahTaskqueue.hpp | 2 ++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp index c7284fbcead..cde8307659f 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp @@ -112,11 +112,15 @@ bool ShenandoahConcurrentGC::collect(GCCause::Cause cause) { ShenandoahBreakpointMarkScope breakpoint_mark_scope(cause); // Concurrent mark roots entry_mark_roots(); - if (check_cancellation_and_abort(ShenandoahDegenPoint::_degenerated_outside_cycle)) return false; + if (check_cancellation_and_abort(ShenandoahDegenPoint::_degenerated_outside_cycle)) { + return false; + } // Continue concurrent mark entry_mark(); - if (check_cancellation_and_abort(ShenandoahDegenPoint::_degenerated_mark)) return false; + if (check_cancellation_and_abort(ShenandoahDegenPoint::_degenerated_mark)) { + return false; + } } // Complete marking under STW, and start evacuation @@ -161,16 +165,22 @@ bool ShenandoahConcurrentGC::collect(GCCause::Cause cause) { if (heap->is_evacuation_in_progress()) { // Concurrently evacuate entry_evacuate(); - if (check_cancellation_and_abort(ShenandoahDegenPoint::_degenerated_evac)) return false; + if (check_cancellation_and_abort(ShenandoahDegenPoint::_degenerated_evac)) { + return false; + } // Perform update-refs phase. vmop_entry_init_updaterefs(); entry_updaterefs(); - if (check_cancellation_and_abort(ShenandoahDegenPoint::_degenerated_updaterefs)) return false; + if (check_cancellation_and_abort(ShenandoahDegenPoint::_degenerated_updaterefs)) { + return false; + } // Concurrent update thread roots entry_update_thread_roots(); - if (check_cancellation_and_abort(ShenandoahDegenPoint::_degenerated_updaterefs)) return false; + if (check_cancellation_and_abort(ShenandoahDegenPoint::_degenerated_updaterefs)) { + return false; + } vmop_entry_final_updaterefs(); diff --git a/src/hotspot/share/gc/shenandoah/shenandoahPacer.hpp b/src/hotspot/share/gc/shenandoah/shenandoahPacer.hpp index faf5172bec0..8dbd9c4d26f 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahPacer.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahPacer.hpp @@ -27,6 +27,7 @@ #include "gc/shenandoah/shenandoahNumberSeq.hpp" #include "gc/shenandoah/shenandoahPadding.hpp" +#include "gc/shenandoah/shenandoahSharedVariables.hpp" #include "memory/allocation.hpp" class ShenandoahHeap; diff --git a/src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp b/src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp index 8a84b4eaa66..90b51160e7a 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp @@ -34,6 +34,8 @@ #include "runtime/mutex.hpp" #include "utilities/debug.hpp" +class ShenandoahHeap; + template class BufferedOverflowTaskQueue: public OverflowTaskQueue {