8290459: Remove unused GCCause enums

Reviewed-by: tschatzl, kbarrett
This commit is contained in:
Axel Boldt-Christmas 2022-07-25 11:03:48 +00:00 committed by Thomas Schatzl
parent d0c365a7b9
commit 350808a5a3
2 changed files with 1 additions and 19 deletions

View File

@ -72,9 +72,6 @@ const char* GCCause::to_string(GCCause::Cause cause) {
case _allocation_failure:
return "Allocation Failure";
case _tenured_generation_full:
return "Tenured Generation Full";
case _codecache_GC_threshold:
return "CodeCache GC Threshold";
@ -84,12 +81,6 @@ const char* GCCause::to_string(GCCause::Cause cause) {
case _metadata_GC_clear_soft_refs:
return "Metadata GC Clear Soft References";
case _old_generation_expanded_on_last_scavenge:
return "Old Generation Expanded On Last Scavenge";
case _old_generation_too_full_to_scavenge:
return "Old Generation Too Full To Scavenge";
case _adaptive_size_policy:
return "Ergonomics";

View File

@ -63,13 +63,10 @@ class GCCause : public AllStatic {
/* implementation specific */
_tenured_generation_full,
_codecache_GC_threshold,
_metadata_GC_threshold,
_metadata_GC_clear_soft_refs,
_old_generation_expanded_on_last_scavenge,
_old_generation_too_full_to_scavenge,
_adaptive_size_policy,
_g1_inc_collection_pause,
@ -109,17 +106,11 @@ class GCCause : public AllStatic {
// Causes for collection of the tenured gernation
inline static bool is_tenured_allocation_failure_gc(GCCause::Cause cause) {
assert(cause != GCCause::_old_generation_too_full_to_scavenge &&
cause != GCCause::_old_generation_expanded_on_last_scavenge,
"This GCCause may be correct but is not expected yet: %s",
to_string(cause));
// _tenured_generation_full for full tenured generations
// _adaptive_size_policy for a full collection after a young GC
// _allocation_failure is the generic cause a collection which could result
// in the collection of the tenured generation if there is not enough space
// in the tenured generation to support a young GC.
return (cause == GCCause::_tenured_generation_full ||
cause == GCCause::_adaptive_size_policy ||
return (cause == GCCause::_adaptive_size_policy ||
cause == GCCause::_allocation_failure);
}