--- old/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp 2015-05-07 13:17:48.809843272 -0700 +++ new/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp 2015-05-07 13:17:48.697843276 -0700 @@ -169,8 +169,7 @@ // +ExplicitGCInvokesConcurrent, we have to wait here for the cycle // that just started (or maybe one that was already in progress) to // finish. - if (_gc_cause == GCCause::_java_lang_system_gc && - _should_initiate_conc_mark) { + if (GCCause::is_system_gc(_gc_cause) && _should_initiate_conc_mark) { assert(ExplicitGCInvokesConcurrent, "the only way to be here is if ExplicitGCInvokesConcurrent is set"); --- old/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2015-05-07 13:17:49.449843250 -0700 +++ new/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2015-05-07 13:17:49.333843254 -0700 @@ -2054,7 +2054,7 @@ marking_phase(vmthread_cm, maximum_heap_compaction, &_gc_tracer); bool max_on_system_gc = UseMaximumCompactionOnSystemGC - && gc_cause == GCCause::_java_lang_system_gc; + && GCCause::is_system_gc(gc_cause); summary_phase(vmthread_cm, maximum_heap_compaction || max_on_system_gc); COMPILER2_PRESENT(assert(DerivedPointerTable::is_active(), "Sanity")); --- old/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp 2015-05-07 13:17:50.121843226 -0700 +++ new/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp 2015-05-07 13:17:50.009843230 -0700 @@ -245,7 +245,7 @@ // Update the pause time. _minor_timer.stop(); - if (gc_cause != GCCause::_java_lang_system_gc || + if (!GCCause::is_system_gc(gc_cause) || UseAdaptiveSizePolicyWithSystemGC) { double minor_pause_in_seconds = _minor_timer.seconds(); double minor_pause_in_ms = minor_pause_in_seconds * MILLIUNITS; --- old/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.hpp 2015-05-07 13:17:50.753843204 -0700 +++ new/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.hpp 2015-05-07 13:17:50.645843208 -0700 @@ -488,7 +488,7 @@ CollectorPolicy* collector_policy); static bool should_update_promo_stats(GCCause::Cause cause) { - return ((cause == GCCause::_java_lang_system_gc && + return ((GCCause::is_system_gc(cause) && UseAdaptiveSizePolicyWithSystemGC) || GCCause::is_tenured_allocation_failure_gc(cause)); } --- old/src/share/vm/gc_interface/gcCause.hpp 2015-05-07 13:17:51.401843182 -0700 +++ new/src/share/vm/gc_interface/gcCause.hpp 2015-05-07 13:17:51.293843186 -0700 @@ -77,6 +77,10 @@ _last_gc_cause }; + inline static bool is_system_gc(GCCause::Cause cause) { + return (cause == GCCause::_java_lang_system_gc); + } + inline static bool is_user_requested_gc(GCCause::Cause cause) { return (cause == GCCause::_java_lang_system_gc || cause == GCCause::_jvmti_force_gc); --- old/src/share/vm/memory/genCollectedHeap.cpp 2015-05-07 13:17:52.029843160 -0700 +++ new/src/share/vm/memory/genCollectedHeap.cpp 2015-05-07 13:17:51.917843164 -0700 @@ -306,7 +306,7 @@ bool GenCollectedHeap::should_do_concurrent_full_gc(GCCause::Cause cause) { return UseConcMarkSweepGC && ((cause == GCCause::_gc_locker && GCLockerInvokesConcurrent) || - (cause == GCCause::_java_lang_system_gc && ExplicitGCInvokesConcurrent)); + (GCCause::is_system_gc(cause) && ExplicitGCInvokesConcurrent)); } void GenCollectedHeap::collect_generation(Generation* gen, bool full, size_t size,