diff --git a/src/hotspot/share/gc/shared/gcCause.cpp b/src/hotspot/share/gc/shared/gcCause.cpp index 51ce73861e0..489a5d32a90 100644 --- a/src/hotspot/share/gc/shared/gcCause.cpp +++ b/src/hotspot/share/gc/shared/gcCause.cpp @@ -89,11 +89,14 @@ const char* GCCause::to_string(GCCause::Cause cause) { case _dcmd_gc_run: return "Diagnostic Command"; + case _shenandoah_stop_vm: + return "Stopping VM"; + case _shenandoah_allocation_failure_evac: return "Allocation Failure During Evacuation"; - case _shenandoah_stop_vm: - return "Stopping VM"; + case _shenandoah_humongous_allocation_failure: + return "Humongous Allocation Failure"; case _shenandoah_concurrent_gc: return "Concurrent GC"; diff --git a/src/hotspot/share/gc/shared/gcCause.hpp b/src/hotspot/share/gc/shared/gcCause.hpp index ef96bf21567..ec7c664bbc1 100644 --- a/src/hotspot/share/gc/shared/gcCause.hpp +++ b/src/hotspot/share/gc/shared/gcCause.hpp @@ -55,7 +55,6 @@ class GCCause : public AllStatic { /* implementation independent, but reserved for GC use */ _no_gc, - _no_cause_specified, _allocation_failure, /* implementation specific */ @@ -99,14 +98,13 @@ class GCCause : public AllStatic { cause == GCCause::_wb_full_gc); } - inline static bool is_serviceability_requested_gc(GCCause::Cause - cause) { + inline static bool is_serviceability_requested_gc(GCCause::Cause cause) { return (cause == GCCause::_jvmti_force_gc || cause == GCCause::_heap_inspection || cause == GCCause::_heap_dump); } - // Causes for collection of the tenured gernation + // Causes for collection of the tenured generation inline static bool is_tenured_allocation_failure_gc(GCCause::Cause cause) { // _allocation_failure is the generic cause a collection which could result // in the collection of the tenured generation if there is not enough space @@ -117,8 +115,7 @@ class GCCause : public AllStatic { // Causes for collection of the young generation inline static bool is_allocation_failure_gc(GCCause::Cause cause) { // _allocation_failure is the generic cause a collection for allocation failure - return (cause == GCCause::_allocation_failure || - cause == GCCause::_shenandoah_allocation_failure_evac); + return cause == GCCause::_allocation_failure; } // Return a string describing the GCCause. diff --git a/src/hotspot/share/gc/shared/gcVMOperations.cpp b/src/hotspot/share/gc/shared/gcVMOperations.cpp index 1632dca61d5..7e24e47d4ef 100644 --- a/src/hotspot/share/gc/shared/gcVMOperations.cpp +++ b/src/hotspot/share/gc/shared/gcVMOperations.cpp @@ -99,8 +99,7 @@ static bool should_use_gclocker() { } bool VM_GC_Operation::doit_prologue() { - assert(((_gc_cause != GCCause::_no_gc) && - (_gc_cause != GCCause::_no_cause_specified)), "Illegal GCCause"); + assert(_gc_cause != GCCause::_no_gc, "Illegal GCCause"); // To be able to handle a GC the VM initialization needs to be completed. if (!is_init_completed()) { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp b/src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp index d8eb8e0a4e1..c0f3cf1a6a1 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp @@ -42,7 +42,7 @@ ShenandoahControlThread::ShenandoahControlThread() : ShenandoahController(), - _requested_gc_cause(GCCause::_no_cause_specified), + _requested_gc_cause(GCCause::_no_gc), _degen_point(ShenandoahGC::_degenerated_outside_cycle) { set_name("Shenandoah Control Thread"); create_and_start(); diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/GCCause.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/GCCause.java index 20fbb2128f0..918d34940f4 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/GCCause.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/GCCause.java @@ -39,7 +39,6 @@ public enum GCCause { _wb_breakpoint ("WhiteBox Initiated Run to Breakpoint"), _no_gc ("No GC"), - _no_cause_specified ("Unknown GCCause"), _allocation_failure ("Allocation Failure"), _codecache_GC_threshold ("CodeCache GC Threshold"), @@ -54,8 +53,9 @@ public enum GCCause { _dcmd_gc_run ("Diagnostic Command"), - _shenandoah_allocation_failure_evac ("Allocation Failure During Evacuation"), _shenandoah_stop_vm ("Stopping VM"), + _shenandoah_allocation_failure_evac ("Allocation Failure During Evacuation"), + _shenandoah_humongous_allocation_failure("Humongous Allocation Failure"), _shenandoah_concurrent_gc ("Concurrent GC"), _shenandoah_upgrade_to_full_gc ("Upgrade To Full GC"),