Skip to content

Commit f375916

Browse files
committedJun 23, 2021
8269186: [REDO] Remove CodeCache::mark_for_evol_deoptimization() method
Reviewed-by: hseigel, lfoltan, sspitsyn
1 parent 7621fa3 commit f375916

File tree

4 files changed

+1
-24
lines changed

4 files changed

+1
-24
lines changed
 

‎src/hotspot/share/code/codeCache.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -1077,12 +1077,6 @@ void CodeCache::old_nmethods_do(MetadataClosure* f) {
10771077
log_debug(redefine, class, nmethod)("Walked %d nmethods for mark_on_stack", length);
10781078
}
10791079

1080-
// Just marks the methods in this class as needing deoptimization
1081-
void CodeCache::mark_for_evol_deoptimization(InstanceKlass* dependee) {
1082-
assert(SafepointSynchronize::is_at_safepoint(), "Can only do this at a safepoint!");
1083-
}
1084-
1085-
10861080
// Walk compiled methods and mark dependent methods for deoptimization.
10871081
int CodeCache::mark_dependents_for_evol_deoptimization() {
10881082
assert(SafepointSynchronize::is_at_safepoint(), "Can only do this at a safepoint!");

‎src/hotspot/share/code/codeCache.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ class CodeCache : AllStatic {
271271

272272
// RedefineClasses support
273273
// Flushing and deoptimization in case of evolution
274-
static void mark_for_evol_deoptimization(InstanceKlass* dependee);
275274
static int mark_dependents_for_evol_deoptimization();
276275
static void mark_all_nmethods_for_evol_deoptimization();
277276
static void flush_evol_dependents();

‎src/hotspot/share/prims/jvmtiRedefineClasses.cpp

+1-16
Original file line numberDiff line numberDiff line change
@@ -4068,7 +4068,7 @@ void VM_RedefineClasses::transfer_old_native_function_registrations(InstanceKlas
40684068
transfer.transfer_registrations(_matching_old_methods, _matching_methods_length);
40694069
}
40704070

4071-
// Deoptimize all compiled code that depends on this class.
4071+
// Deoptimize all compiled code that depends on the classes redefined.
40724072
//
40734073
// If the can_redefine_classes capability is obtained in the onload
40744074
// phase then the compiler has recorded all dependencies from startup.
@@ -4084,18 +4084,6 @@ void VM_RedefineClasses::transfer_old_native_function_registrations(InstanceKlas
40844084
// that depends on the class.
40854085
//
40864086

4087-
// First step is to walk the code cache for each class redefined and mark
4088-
// dependent methods. Wait until all classes are processed to deoptimize everything.
4089-
void VM_RedefineClasses::mark_dependent_code(InstanceKlass* ik) {
4090-
assert_locked_or_safepoint(Compile_lock);
4091-
4092-
// All dependencies have been recorded from startup or this is a second or
4093-
// subsequent use of RedefineClasses
4094-
if (JvmtiExport::all_dependencies_are_recorded()) {
4095-
CodeCache::mark_for_evol_deoptimization(ik);
4096-
}
4097-
}
4098-
40994087
void VM_RedefineClasses::flush_dependent_code() {
41004088
assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
41014089

@@ -4221,9 +4209,6 @@ void VM_RedefineClasses::redefine_single_class(Thread* current, jclass the_jclas
42214209
JvmtiBreakpoints& jvmti_breakpoints = JvmtiCurrentBreakpoints::get_jvmti_breakpoints();
42224210
jvmti_breakpoints.clearall_in_class_at_safepoint(the_class);
42234211

4224-
// Mark all compiled code that depends on this class
4225-
mark_dependent_code(the_class);
4226-
42274212
_old_methods = the_class->methods();
42284213
_new_methods = scratch_class->methods();
42294214
_the_class = the_class;

‎src/hotspot/share/prims/jvmtiRedefineClasses.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,6 @@ class VM_RedefineClasses: public VM_Operation {
493493
constantPoolHandle scratch_cp, int scratch_cp_length, TRAPS);
494494

495495
void flush_dependent_code();
496-
void mark_dependent_code(InstanceKlass* ik);
497496

498497
// lock classes to redefine since constant pool merging isn't thread safe.
499498
void lock_classes();

0 commit comments

Comments
 (0)
Please sign in to comment.