From 74df384a9870431efb184158bba032c79c35356e Mon Sep 17 00:00:00 2001 From: Kelvin Nilsen Date: Thu, 20 Mar 2025 00:53:33 +0000 Subject: [PATCH] 8352428: GenShen: Old-gen cycles are still looping Reviewed-by: wkemper, shade --- .../share/gc/shenandoah/heuristics/shenandoahHeuristics.cpp | 1 + src/hotspot/share/gc/shenandoah/shenandoahRegulatorThread.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahHeuristics.cpp b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahHeuristics.cpp index f5bc74b2b1b..0f570078150 100644 --- a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahHeuristics.cpp +++ b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahHeuristics.cpp @@ -188,6 +188,7 @@ void ShenandoahHeuristics::record_cycle_end() { bool ShenandoahHeuristics::should_start_gc() { if (_start_gc_is_pending) { + log_trigger("GC start is already pending"); return true; } // Perform GC to cleanup metaspace diff --git a/src/hotspot/share/gc/shenandoah/shenandoahRegulatorThread.cpp b/src/hotspot/share/gc/shenandoah/shenandoahRegulatorThread.cpp index f9e6f714c7f..bf309af9743 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahRegulatorThread.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahRegulatorThread.cpp @@ -80,6 +80,7 @@ void ShenandoahRegulatorThread::regulate_young_and_old_cycles() { } } else if (_old_heuristics->should_resume_old_cycle() || _old_heuristics->should_start_gc()) { if (request_concurrent_gc(_heap->old_generation())) { + _old_heuristics->cancel_trigger_request(); log_debug(gc)("Heuristics request to resume old collection accepted"); } }