< prev index next >

src/share/vm/prims/whitebox.cpp

Print this page
rev 13233 : 8179268: Factor out AdaptiveSizePolicy from top-level interfaces CollectorPolicy and CollectedHeap

*** 1200,1217 **** jchar* name = java_lang_String::as_unicode_string(JNIHandles::resolve(javaString), len, CHECK_false); return (StringTable::lookup(name, len) != NULL); 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::_wb_full_gc); ! #if INCLUDE_ALL_GCS ! if (UseG1GC) { ! // Needs to be cleared explicitly for G1 ! Universe::heap()->collector_policy()->set_should_clear_all_soft_refs(false); } ! #endif // INCLUDE_ALL_GCS WB_END WB_ENTRY(void, WB_YoungGC(JNIEnv* env, jobject o)) Universe::heap()->collect(GCCause::_wb_young_gc); WB_END --- 1200,1213 ---- jchar* name = java_lang_String::as_unicode_string(JNIHandles::resolve(javaString), len, CHECK_false); return (StringTable::lookup(name, len) != NULL); WB_END WB_ENTRY(void, WB_FullGC(JNIEnv* env, jobject o)) ! if (Universe::heap()->collector_policy()->is_generation_policy()) { ! Universe::heap()->collector_policy()->as_generation_policy()->set_should_clear_all_soft_refs(true); } ! Universe::heap()->collect(GCCause::_wb_full_gc); WB_END WB_ENTRY(void, WB_YoungGC(JNIEnv* env, jobject o)) Universe::heap()->collect(GCCause::_wb_young_gc); WB_END
< prev index next >