8269186: [REDO] Remove CodeCache::mark_for_evol_deoptimization() method
Reviewed-by: hseigel, lfoltan, sspitsyn
This commit is contained in:
parent
7621fa37ef
commit
f375916417
src/hotspot/share
@ -1077,12 +1077,6 @@ void CodeCache::old_nmethods_do(MetadataClosure* f) {
|
|||||||
log_debug(redefine, class, nmethod)("Walked %d nmethods for mark_on_stack", length);
|
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.
|
// Walk compiled methods and mark dependent methods for deoptimization.
|
||||||
int CodeCache::mark_dependents_for_evol_deoptimization() {
|
int CodeCache::mark_dependents_for_evol_deoptimization() {
|
||||||
assert(SafepointSynchronize::is_at_safepoint(), "Can only do this at a safepoint!");
|
assert(SafepointSynchronize::is_at_safepoint(), "Can only do this at a safepoint!");
|
||||||
|
@ -271,7 +271,6 @@ class CodeCache : AllStatic {
|
|||||||
|
|
||||||
// RedefineClasses support
|
// RedefineClasses support
|
||||||
// Flushing and deoptimization in case of evolution
|
// Flushing and deoptimization in case of evolution
|
||||||
static void mark_for_evol_deoptimization(InstanceKlass* dependee);
|
|
||||||
static int mark_dependents_for_evol_deoptimization();
|
static int mark_dependents_for_evol_deoptimization();
|
||||||
static void mark_all_nmethods_for_evol_deoptimization();
|
static void mark_all_nmethods_for_evol_deoptimization();
|
||||||
static void flush_evol_dependents();
|
static void flush_evol_dependents();
|
||||||
|
@ -4068,7 +4068,7 @@ void VM_RedefineClasses::transfer_old_native_function_registrations(InstanceKlas
|
|||||||
transfer.transfer_registrations(_matching_old_methods, _matching_methods_length);
|
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
|
// If the can_redefine_classes capability is obtained in the onload
|
||||||
// phase then the compiler has recorded all dependencies from startup.
|
// 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.
|
// 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() {
|
void VM_RedefineClasses::flush_dependent_code() {
|
||||||
assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
|
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();
|
JvmtiBreakpoints& jvmti_breakpoints = JvmtiCurrentBreakpoints::get_jvmti_breakpoints();
|
||||||
jvmti_breakpoints.clearall_in_class_at_safepoint(the_class);
|
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();
|
_old_methods = the_class->methods();
|
||||||
_new_methods = scratch_class->methods();
|
_new_methods = scratch_class->methods();
|
||||||
_the_class = the_class;
|
_the_class = the_class;
|
||||||
|
@ -493,7 +493,6 @@ class VM_RedefineClasses: public VM_Operation {
|
|||||||
constantPoolHandle scratch_cp, int scratch_cp_length, TRAPS);
|
constantPoolHandle scratch_cp, int scratch_cp_length, TRAPS);
|
||||||
|
|
||||||
void flush_dependent_code();
|
void flush_dependent_code();
|
||||||
void mark_dependent_code(InstanceKlass* ik);
|
|
||||||
|
|
||||||
// lock classes to redefine since constant pool merging isn't thread safe.
|
// lock classes to redefine since constant pool merging isn't thread safe.
|
||||||
void lock_classes();
|
void lock_classes();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user