< prev index next >
src/hotspot/share/ci/ciEnv.cpp
Print this page
*** 152,161 ****
--- 152,162 ----
_ArrayStoreException_instance = NULL;
_ClassCastException_instance = NULL;
_the_null_string = NULL;
_the_min_jint_string = NULL;
+ _jvmti_redefinition_count = 0;
_jvmti_can_hotswap_or_post_breakpoint = false;
_jvmti_can_access_local_variables = false;
_jvmti_can_post_on_exceptions = false;
_jvmti_can_pop_frame = false;
}
*** 207,216 ****
--- 208,218 ----
_ArrayStoreException_instance = NULL;
_ClassCastException_instance = NULL;
_the_null_string = NULL;
_the_min_jint_string = NULL;
+ _jvmti_redefinition_count = 0;
_jvmti_can_hotswap_or_post_breakpoint = false;
_jvmti_can_access_local_variables = false;
_jvmti_can_post_on_exceptions = false;
_jvmti_can_pop_frame = false;
}
*** 229,245 ****
--- 231,253 ----
// Cache Jvmti state
void ciEnv::cache_jvmti_state() {
VM_ENTRY_MARK;
// Get Jvmti capabilities under lock to get consistant values.
MutexLocker mu(JvmtiThreadState_lock);
+ _jvmti_redefinition_count = JvmtiExport::redefinition_count();
_jvmti_can_hotswap_or_post_breakpoint = JvmtiExport::can_hotswap_or_post_breakpoint();
_jvmti_can_access_local_variables = JvmtiExport::can_access_local_variables();
_jvmti_can_post_on_exceptions = JvmtiExport::can_post_on_exceptions();
_jvmti_can_pop_frame = JvmtiExport::can_pop_frame();
}
bool ciEnv::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;
}
if (!_jvmti_can_hotswap_or_post_breakpoint &&
*** 252,261 ****
--- 260,270 ----
}
if (!_jvmti_can_pop_frame &&
JvmtiExport::can_pop_frame()) {
return true;
}
+
return false;
}
// ------------------------------------------------------------------
// Cache DTrace flags
*** 1223,1232 ****
--- 1232,1242 ----
}
void ciEnv::dump_replay_data_unsafe(outputStream* out) {
ResourceMark rm;
#if INCLUDE_JVMTI
+ out->print_cr("JvmtiExport redefinition_count %d", _jvmti_redefinition_count);
out->print_cr("JvmtiExport can_access_local_variables %d", _jvmti_can_access_local_variables);
out->print_cr("JvmtiExport can_hotswap_or_post_breakpoint %d", _jvmti_can_hotswap_or_post_breakpoint);
out->print_cr("JvmtiExport can_post_on_exceptions %d", _jvmti_can_post_on_exceptions);
#endif // INCLUDE_JVMTI
< prev index next >