8152113: Remove _last_ditch_collection GC-cause and avoid expanding heap on Metaspace OOM

Reviewed-by: brutisso, jwilhelm
This commit is contained in:
Stefan Johansson 2016-03-18 13:18:58 +01:00
parent 0fed01a8ec
commit 77de5508e9
7 changed files with 18 additions and 22 deletions

View file

@ -987,7 +987,7 @@ WB_END
WB_ENTRY(void, WB_FullGC(JNIEnv* env, jobject o))
Universe::heap()->collector_policy()->set_should_clear_all_soft_refs(true);
Universe::heap()->collect(GCCause::_last_ditch_collection);
Universe::heap()->collect(GCCause::_wb_full_gc);
#if INCLUDE_ALL_GCS
if (UseG1GC) {
// Needs to be cleared explicitly for G1