8209447: vmTestbase/vm/mlvm/indy/func/jvmti/mergeCP_none2indy_b/TestDescription.java timed out

Was walking code cache for every safepoint because redefined methods take a long time to clear out of the code cache

Reviewed-by: eosterlund, rehn
This commit is contained in:
Coleen Phillimore 2018-08-15 15:50:23 -04:00
parent 07f3f674c2
commit 68e65d8ece

View File

@ -94,9 +94,12 @@ void ClassLoaderDataGraph::dec_array_classes(size_t count) {
}
bool ClassLoaderDataGraph::should_clean_metaspaces_and_reset() {
bool do_cleaning = _safepoint_cleanup_needed && _should_clean_deallocate_lists;
// Only clean metaspaces after full GC.
bool do_cleaning = _safepoint_cleanup_needed;
#if INCLUDE_JVMTI
do_cleaning = do_cleaning || InstanceKlass::has_previous_versions();
do_cleaning = do_cleaning && (_should_clean_deallocate_lists || InstanceKlass::has_previous_versions());
#else
do_cleaning = do_cleaning && _should_clean_deallocate_lists;
#endif
_safepoint_cleanup_needed = false; // reset
return do_cleaning;