< prev index next >

src/hotspot/share/prims/jvmtiEnv.cpp

Print this page

        

*** 1211,1222 **** if (java_thread == calling_thread) { err = get_owned_monitors(calling_thread, java_thread, owned_monitors_list); } else { // get owned monitors info with handshake GetOwnedMonitorInfoClosure op(calling_thread, this, owned_monitors_list); ! Handshake::execute_direct(&op, java_thread); ! err = op.result(); } jint owned_monitor_count = owned_monitors_list->length(); if (err == JVMTI_ERROR_NONE) { if ((err = allocate(owned_monitor_count * sizeof(jobject *), (unsigned char**)owned_monitors_ptr)) == JVMTI_ERROR_NONE) { --- 1211,1222 ---- if (java_thread == calling_thread) { err = get_owned_monitors(calling_thread, java_thread, owned_monitors_list); } else { // get owned monitors info with handshake GetOwnedMonitorInfoClosure op(calling_thread, this, owned_monitors_list); ! bool executed = Handshake::execute_direct(&op, java_thread); ! err = executed ? op.result() : JVMTI_ERROR_THREAD_NOT_ALIVE; } jint owned_monitor_count = owned_monitors_list->length(); if (err == JVMTI_ERROR_NONE) { if ((err = allocate(owned_monitor_count * sizeof(jobject *), (unsigned char**)owned_monitors_ptr)) == JVMTI_ERROR_NONE) {
*** 1256,1267 **** if (java_thread == calling_thread) { err = get_owned_monitors(calling_thread, java_thread, owned_monitors_list); } else { // get owned monitors info with handshake GetOwnedMonitorInfoClosure op(calling_thread, this, owned_monitors_list); ! Handshake::execute_direct(&op, java_thread); ! err = op.result(); } jint owned_monitor_count = owned_monitors_list->length(); if (err == JVMTI_ERROR_NONE) { if ((err = allocate(owned_monitor_count * sizeof(jvmtiMonitorStackDepthInfo), --- 1256,1267 ---- if (java_thread == calling_thread) { err = get_owned_monitors(calling_thread, java_thread, owned_monitors_list); } else { // get owned monitors info with handshake GetOwnedMonitorInfoClosure op(calling_thread, this, owned_monitors_list); ! bool executed = Handshake::execute_direct(&op, java_thread); ! err = executed ? op.result() : JVMTI_ERROR_THREAD_NOT_ALIVE; } jint owned_monitor_count = owned_monitors_list->length(); if (err == JVMTI_ERROR_NONE) { if ((err = allocate(owned_monitor_count * sizeof(jvmtiMonitorStackDepthInfo),
*** 1300,1311 **** if (java_thread == calling_thread) { err = get_current_contended_monitor(calling_thread, java_thread, monitor_ptr); } else { // get contended monitor information with handshake GetCurrentContendedMonitorClosure op(calling_thread, this, monitor_ptr); ! Handshake::execute_direct(&op, java_thread); ! err = op.result(); } return err; } /* end GetCurrentContendedMonitor */ --- 1300,1311 ---- if (java_thread == calling_thread) { err = get_current_contended_monitor(calling_thread, java_thread, monitor_ptr); } else { // get contended monitor information with handshake GetCurrentContendedMonitorClosure op(calling_thread, this, monitor_ptr); ! bool executed = Handshake::execute_direct(&op, java_thread); ! err = executed ? op.result() : JVMTI_ERROR_THREAD_NOT_ALIVE; } return err; } /* end GetCurrentContendedMonitor */
< prev index next >