8049831: Metadata Full GCs are not triggered when CMSClassUnloadingEnabled is turned off

Reviewed-by: brutisso, tschatzl, ehelin, jmasa, dfazunen
This commit is contained in:
Stefan Karlsson 2014-07-11 09:07:23 +02:00
parent b77bc85799
commit a5b4cec253
2 changed files with 18 additions and 16 deletions

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -197,10 +197,12 @@ void VM_GenCollectFull::doit() {
bool VM_CollectForMetadataAllocation::initiate_concurrent_GC() { bool VM_CollectForMetadataAllocation::initiate_concurrent_GC() {
#if INCLUDE_ALL_GCS #if INCLUDE_ALL_GCS
if (UseConcMarkSweepGC || UseG1GC) {
if (UseConcMarkSweepGC && CMSClassUnloadingEnabled) { if (UseConcMarkSweepGC && CMSClassUnloadingEnabled) {
MetaspaceGC::set_should_concurrent_collect(true); MetaspaceGC::set_should_concurrent_collect(true);
} else if (UseG1GC) { return true;
}
if (UseG1GC) {
G1CollectedHeap* g1h = G1CollectedHeap::heap(); G1CollectedHeap* g1h = G1CollectedHeap::heap();
g1h->g1_policy()->set_initiate_conc_mark_if_possible(); g1h->g1_policy()->set_initiate_conc_mark_if_possible();
@ -214,11 +216,10 @@ bool VM_CollectForMetadataAllocation::initiate_concurrent_GC() {
double pause_target = g1h->g1_policy()->max_pause_time_ms(); double pause_target = g1h->g1_policy()->max_pause_time_ms();
g1h->do_collection_pause_at_safepoint(pause_target); g1h->do_collection_pause_at_safepoint(pause_target);
} }
}
return true; return true;
} }
#endif #endif
return false; return false;
} }

View File

@ -271,6 +271,7 @@ needs_cmsgc = \
gc/arguments/TestCMSHeapSizeFlags.java \ gc/arguments/TestCMSHeapSizeFlags.java \
gc/arguments/TestMaxNewSize.java \ gc/arguments/TestMaxNewSize.java \
gc/arguments/TestUseCompressedOopsErgo.java \ gc/arguments/TestUseCompressedOopsErgo.java \
gc/class_unloading/TestCMSClassUnloadingDisabledHWM.java \
gc/concurrentMarkSweep/ \ gc/concurrentMarkSweep/ \
gc/startup_warnings/TestCMS.java \ gc/startup_warnings/TestCMS.java \
gc/startup_warnings/TestCMSIncrementalMode.java \ gc/startup_warnings/TestCMSIncrementalMode.java \