8357818: Shenandoah doesn't use shared API for printing heap before/after GC

Reviewed-by: wkemper, kdnilsen
This commit is contained in:
Rui Li 2025-07-24 18:34:26 +00:00 committed by Paul Hohensee
parent 8477630970
commit 4e53a9d9df
2 changed files with 4 additions and 0 deletions

View File

@ -146,6 +146,7 @@ void ShenandoahControlThread::run_service() {
// If GC was requested, we better dump freeset data for performance debugging
heap->free_set()->log_status_under_lock();
heap->print_before_gc();
switch (mode) {
case concurrent_normal:
service_concurrent_normal_cycle(cause);
@ -159,6 +160,7 @@ void ShenandoahControlThread::run_service() {
default:
ShouldNotReachHere();
}
heap->print_after_gc();
// If this was the requested GC cycle, notify waiters about it
if (is_gc_requested) {

View File

@ -240,6 +240,7 @@ void ShenandoahGenerationalControlThread::run_gc_cycle(const ShenandoahGCRequest
// Cannot uncommit bitmap slices during concurrent reset
ShenandoahNoUncommitMark forbid_region_uncommit(_heap);
_heap->print_before_gc();
switch (gc_mode()) {
case concurrent_normal: {
service_concurrent_normal_cycle(request);
@ -261,6 +262,7 @@ void ShenandoahGenerationalControlThread::run_gc_cycle(const ShenandoahGCRequest
default:
ShouldNotReachHere();
}
_heap->print_after_gc();
}
// If this cycle completed successfully, notify threads waiting for gc