From bd268137ed2e97d5ca6842758bd49ca66e8a3859 Mon Sep 17 00:00:00 2001 From: Albert Mingkun Yang Date: Fri, 15 Sep 2023 11:39:16 +0000 Subject: [PATCH] 8316295: Serial: Remove empty Generation::promotion_failure_occurred Reviewed-by: tschatzl --- src/hotspot/share/gc/serial/defNewGeneration.cpp | 2 -- src/hotspot/share/gc/shared/generation.hpp | 6 ------ 2 files changed, 8 deletions(-) diff --git a/src/hotspot/share/gc/serial/defNewGeneration.cpp b/src/hotspot/share/gc/serial/defNewGeneration.cpp index 5c5b68e1414..541521e3411 100644 --- a/src/hotspot/share/gc/serial/defNewGeneration.cpp +++ b/src/hotspot/share/gc/serial/defNewGeneration.cpp @@ -846,8 +846,6 @@ void DefNewGeneration::collect(bool full, from()->set_next_compaction_space(to()); heap->set_incremental_collection_failed(); - // Inform the next generation that a promotion failure occurred. - _old_gen->promotion_failure_occurred(); _gc_tracer->report_promotion_failed(_promotion_failed_info); // Reset the PromotionFailureALot counters. diff --git a/src/hotspot/share/gc/shared/generation.hpp b/src/hotspot/share/gc/shared/generation.hpp index 59d07cb9210..6af578e4ab2 100644 --- a/src/hotspot/share/gc/shared/generation.hpp +++ b/src/hotspot/share/gc/shared/generation.hpp @@ -142,12 +142,6 @@ class Generation: public CHeapObj { // might be attempted in the worst case. virtual bool promotion_attempt_is_safe(size_t max_promotion_in_bytes) const; - // For a non-young generation, this interface can be used to inform a - // generation that a promotion attempt into that generation failed. - // Typically used to enable diagnostic output for post-mortem analysis, - // but other uses of the interface are not ruled out. - virtual void promotion_failure_occurred() { /* does nothing */ } - // Return an estimate of the maximum allocation that could be performed // in the generation without triggering any collection or expansion // activity. It is "unsafe" because no locks are taken; the result