1225 // in any order and, indeed, concurrently. |
1225 // in any order and, indeed, concurrently. |
1226 void ReferenceProcessor::preclean_discovered_references( |
1226 void ReferenceProcessor::preclean_discovered_references( |
1227 BoolObjectClosure* is_alive, |
1227 BoolObjectClosure* is_alive, |
1228 OopClosure* keep_alive, |
1228 OopClosure* keep_alive, |
1229 VoidClosure* complete_gc, |
1229 VoidClosure* complete_gc, |
1230 YieldClosure* yield) { |
1230 YieldClosure* yield, |
|
1231 bool should_unload_classes) { |
1231 |
1232 |
1232 NOT_PRODUCT(verify_ok_to_handle_reflists()); |
1233 NOT_PRODUCT(verify_ok_to_handle_reflists()); |
1233 |
1234 |
1234 #ifdef ASSERT |
1235 #ifdef ASSERT |
1235 bool must_remember_klasses = ClassUnloading && !UseConcMarkSweepGC || |
1236 bool must_remember_klasses = ClassUnloading && !UseConcMarkSweepGC || |
1236 CMSClassUnloadingEnabled && UseConcMarkSweepGC; |
1237 CMSClassUnloadingEnabled && UseConcMarkSweepGC || |
|
1238 ExplicitGCInvokesConcurrentAndUnloadsClasses && |
|
1239 UseConcMarkSweepGC && should_unload_classes; |
1237 RememberKlassesChecker mx(must_remember_klasses); |
1240 RememberKlassesChecker mx(must_remember_klasses); |
1238 #endif |
1241 #endif |
1239 // Soft references |
1242 // Soft references |
1240 { |
1243 { |
1241 TraceTime tt("Preclean SoftReferences", PrintGCDetails && PrintReferenceGC, |
1244 TraceTime tt("Preclean SoftReferences", PrintGCDetails && PrintReferenceGC, |