8364254: Serial: Remove soft ref policy update in WhiteBox FullGC

Reviewed-by: tschatzl, sangheki
This commit is contained in:
Albert Mingkun Yang 2025-08-05 10:43:30 +00:00
parent df736eb582
commit ba0ae4cb28

View File

@ -1502,12 +1502,12 @@ WB_END
WB_ENTRY(void, WB_FullGC(JNIEnv* env, jobject o))
Universe::heap()->soft_ref_policy()->set_should_clear_all_soft_refs(true);
Universe::heap()->collect(GCCause::_wb_full_gc);
#if INCLUDE_G1GC || INCLUDE_SERIALGC
if (UseG1GC || UseSerialGC) {
// Needs to be cleared explicitly for G1 and Serial GC.
#if INCLUDE_G1GC
if (UseG1GC) {
// Needs to be cleared explicitly for G1 GC.
Universe::heap()->soft_ref_policy()->set_should_clear_all_soft_refs(false);
}
#endif // INCLUDE_G1GC || INCLUDE_SERIALGC
#endif // INCLUDE_G1GC
WB_END
WB_ENTRY(void, WB_YoungGC(JNIEnv* env, jobject o))