8269186: [REDO] Remove CodeCache::mark_for_evol_deoptimization() method

Reviewed-by: hseigel, lfoltan, sspitsyn
This commit is contained in:
Coleen Phillimore 2021-06-23 21:11:06 +00:00
parent 7621fa37ef
commit f375916417
4 changed files with 1 additions and 24 deletions

View File

@ -1077,12 +1077,6 @@ void CodeCache::old_nmethods_do(MetadataClosure* f) {
log_debug(redefine, class, nmethod)("Walked %d nmethods for mark_on_stack", length);
}
// Just marks the methods in this class as needing deoptimization
void CodeCache::mark_for_evol_deoptimization(InstanceKlass* dependee) {
assert(SafepointSynchronize::is_at_safepoint(), "Can only do this at a safepoint!");
}
// Walk compiled methods and mark dependent methods for deoptimization.
int CodeCache::mark_dependents_for_evol_deoptimization() {
assert(SafepointSynchronize::is_at_safepoint(), "Can only do this at a safepoint!");

View File

@ -271,7 +271,6 @@ class CodeCache : AllStatic {
// RedefineClasses support
// Flushing and deoptimization in case of evolution
static void mark_for_evol_deoptimization(InstanceKlass* dependee);
static int mark_dependents_for_evol_deoptimization();
static void mark_all_nmethods_for_evol_deoptimization();
static void flush_evol_dependents();

View File

@ -4068,7 +4068,7 @@ void VM_RedefineClasses::transfer_old_native_function_registrations(InstanceKlas
transfer.transfer_registrations(_matching_old_methods, _matching_methods_length);
}
// Deoptimize all compiled code that depends on this class.
// Deoptimize all compiled code that depends on the classes redefined.
//
// If the can_redefine_classes capability is obtained in the onload
// phase then the compiler has recorded all dependencies from startup.
@ -4084,18 +4084,6 @@ void VM_RedefineClasses::transfer_old_native_function_registrations(InstanceKlas
// that depends on the class.
//
// First step is to walk the code cache for each class redefined and mark
// dependent methods. Wait until all classes are processed to deoptimize everything.
void VM_RedefineClasses::mark_dependent_code(InstanceKlass* ik) {
assert_locked_or_safepoint(Compile_lock);
// All dependencies have been recorded from startup or this is a second or
// subsequent use of RedefineClasses
if (JvmtiExport::all_dependencies_are_recorded()) {
CodeCache::mark_for_evol_deoptimization(ik);
}
}
void VM_RedefineClasses::flush_dependent_code() {
assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
@ -4221,9 +4209,6 @@ void VM_RedefineClasses::redefine_single_class(Thread* current, jclass the_jclas
JvmtiBreakpoints& jvmti_breakpoints = JvmtiCurrentBreakpoints::get_jvmti_breakpoints();
jvmti_breakpoints.clearall_in_class_at_safepoint(the_class);
// Mark all compiled code that depends on this class
mark_dependent_code(the_class);
_old_methods = the_class->methods();
_new_methods = scratch_class->methods();
_the_class = the_class;

View File

@ -493,7 +493,6 @@ class VM_RedefineClasses: public VM_Operation {
constantPoolHandle scratch_cp, int scratch_cp_length, TRAPS);
void flush_dependent_code();
void mark_dependent_code(InstanceKlass* ik);
// lock classes to redefine since constant pool merging isn't thread safe.
void lock_classes();