diff --git a/src/share/vm/gc_implementation/shared/vmGCOperations.cpp b/src/share/vm/gc_implementation/shared/vmGCOperations.cpp index 477e79ca73432fb72922dc447d43c571ad08c8c4..e08c950f9ee8876c14f725f7d623605341fb82de 100644 --- a/src/share/vm/gc_implementation/shared/vmGCOperations.cpp +++ b/src/share/vm/gc_implementation/shared/vmGCOperations.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -211,28 +211,29 @@ void VM_GenCollectFull::doit() { bool VM_CollectForMetadataAllocation::initiate_concurrent_GC() { #if INCLUDE_ALL_GCS - if (UseConcMarkSweepGC || UseG1GC) { - if (UseConcMarkSweepGC && CMSClassUnloadingEnabled) { - MetaspaceGC::set_should_concurrent_collect(true); - } else if (UseG1GC) { - G1CollectedHeap* g1h = G1CollectedHeap::heap(); - g1h->g1_policy()->set_initiate_conc_mark_if_possible(); + if (UseConcMarkSweepGC && CMSClassUnloadingEnabled) { + MetaspaceGC::set_should_concurrent_collect(true); + return true; + } - GCCauseSetter x(g1h, _gc_cause); + if (UseG1GC) { + G1CollectedHeap* g1h = G1CollectedHeap::heap(); + g1h->g1_policy()->set_initiate_conc_mark_if_possible(); - // At this point we are supposed to start a concurrent cycle. We - // will do so if one is not already in progress. - bool should_start = g1h->g1_policy()->force_initial_mark_if_outside_cycle(_gc_cause); + GCCauseSetter x(g1h, _gc_cause); - if (should_start) { - double pause_target = g1h->g1_policy()->max_pause_time_ms(); - g1h->do_collection_pause_at_safepoint(pause_target); - } - } + // At this point we are supposed to start a concurrent cycle. We + // will do so if one is not already in progress. + bool should_start = g1h->g1_policy()->force_initial_mark_if_outside_cycle(_gc_cause); + if (should_start) { + double pause_target = g1h->g1_policy()->max_pause_time_ms(); + g1h->do_collection_pause_at_safepoint(pause_target); + } return true; } #endif + return false; } diff --git a/test/TEST.groups b/test/TEST.groups index d526a64562a81c9d05b451c64b981409d0408727..03011eccb17881edafa06c6ab42424b3c34a4284 100644 --- a/test/TEST.groups +++ b/test/TEST.groups @@ -169,6 +169,7 @@ compact1 = \ # needs_full_vm_compact1 = \ runtime/NMT \ + gc/class_unloading/TestCMSClassUnloadingDisabledHWM.java \ gc/g1/TestRegionAlignment.java \ gc/g1/TestShrinkToOneRegion.java \ gc/metaspace/G1AddMetaspaceDependency.java \