--- old/src/hotspot/share/jvmci/jvmciEnv.cpp 2019-09-25 09:46:48.135919564 -0400 +++ new/src/hotspot/share/jvmci/jvmciEnv.cpp 2019-09-25 09:46:47.879919573 -0400 @@ -44,6 +44,7 @@ _failure_reason_on_C_heap(false) { // Get Jvmti capabilities under lock to get consistent values. MutexLocker mu(JvmtiThreadState_lock); + _jvmti_redefinition_count = JvmtiExport::redefinition_count(); _jvmti_can_hotswap_or_post_breakpoint = JvmtiExport::can_hotswap_or_post_breakpoint() ? 1 : 0; _jvmti_can_access_local_variables = JvmtiExport::can_access_local_variables() ? 1 : 0; _jvmti_can_post_on_exceptions = JvmtiExport::can_post_on_exceptions() ? 1 : 0; @@ -51,6 +52,10 @@ } bool JVMCICompileState::jvmti_state_changed() const { + // Some classes were redefined + if (_jvmti_redefinition_count != JvmtiExport::redefinition_count()) { + return true; + } if (!jvmti_can_access_local_variables() && JvmtiExport::can_access_local_variables()) { return true;