Skip to content

Commit

Permalink
8290459: Remove unused GCCause enums
Browse files Browse the repository at this point in the history
Reviewed-by: tschatzl, kbarrett
  • Loading branch information
xmas92 authored and Thomas Schatzl committed Jul 25, 2022
1 parent d0c365a commit 350808a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
9 changes: 0 additions & 9 deletions src/hotspot/share/gc/shared/gcCause.cpp
Expand Up @@ -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";

Expand All @@ -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";

Expand Down
11 changes: 1 addition & 10 deletions src/hotspot/share/gc/shared/gcCause.hpp
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
}

Expand Down

1 comment on commit 350808a

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.