< prev index next >

src/hotspot/share/prims/jvmtiExport.cpp

Print this page




1628       if (ets->is_frame_pop(cur_frame_number)) {
1629         // we have a NotifyFramePop entry for this frame.
1630         // now check that this env/thread wants this event
1631         if (ets->is_enabled(JVMTI_EVENT_FRAME_POP)) {
1632           EVT_TRACE(JVMTI_EVENT_FRAME_POP, ("[%s] Evt Frame Pop sent %s.%s",
1633                                             JvmtiTrace::safe_get_thread_name(thread),
1634                                             (mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
1635                                             (mh() == NULL) ? "NULL" : mh()->name()->as_C_string() ));
1636 
1637           // we also need to issue a frame pop event for this frame
1638           JvmtiEnv *env = ets->get_env();
1639           JvmtiMethodEventMark jem(thread, mh);
1640           JvmtiJavaThreadEventTransition jet(thread);
1641           jvmtiEventFramePop callback = env->callbacks()->FramePop;
1642           if (callback != NULL) {
1643             (*callback)(env->jvmti_external(), jem.jni_env(), jem.jni_thread(),
1644                         jem.jni_methodID(), exception_exit);
1645           }
1646         }
1647         // remove the frame's entry


1648         ets->clear_frame_pop(cur_frame_number);

1649       }
1650     }
1651   }
1652 
1653   state->decr_cur_stack_depth();
1654 }
1655 
1656 
1657 // Todo: inline this for optimization
1658 void JvmtiExport::post_single_step(JavaThread *thread, Method* method, address location) {
1659   HandleMark hm(thread);
1660   methodHandle mh(thread, method);
1661 
1662   JvmtiThreadState *state = thread->jvmti_thread_state();
1663   if (state == NULL) {
1664     return;
1665   }
1666   JvmtiEnvThreadStateIterator it(state);
1667   for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
1668     ets->compare_and_set_current_location(mh(), location, JVMTI_EVENT_SINGLE_STEP);




1628       if (ets->is_frame_pop(cur_frame_number)) {
1629         // we have a NotifyFramePop entry for this frame.
1630         // now check that this env/thread wants this event
1631         if (ets->is_enabled(JVMTI_EVENT_FRAME_POP)) {
1632           EVT_TRACE(JVMTI_EVENT_FRAME_POP, ("[%s] Evt Frame Pop sent %s.%s",
1633                                             JvmtiTrace::safe_get_thread_name(thread),
1634                                             (mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
1635                                             (mh() == NULL) ? "NULL" : mh()->name()->as_C_string() ));
1636 
1637           // we also need to issue a frame pop event for this frame
1638           JvmtiEnv *env = ets->get_env();
1639           JvmtiMethodEventMark jem(thread, mh);
1640           JvmtiJavaThreadEventTransition jet(thread);
1641           jvmtiEventFramePop callback = env->callbacks()->FramePop;
1642           if (callback != NULL) {
1643             (*callback)(env->jvmti_external(), jem.jni_env(), jem.jni_thread(),
1644                         jem.jni_methodID(), exception_exit);
1645           }
1646         }
1647         // remove the frame's entry
1648         {
1649           MutexLocker mu(JvmtiThreadState_lock);
1650           ets->clear_frame_pop(cur_frame_number);
1651         }
1652       }
1653     }
1654   }
1655 
1656   state->decr_cur_stack_depth();
1657 }
1658 
1659 
1660 // Todo: inline this for optimization
1661 void JvmtiExport::post_single_step(JavaThread *thread, Method* method, address location) {
1662   HandleMark hm(thread);
1663   methodHandle mh(thread, method);
1664 
1665   JvmtiThreadState *state = thread->jvmti_thread_state();
1666   if (state == NULL) {
1667     return;
1668   }
1669   JvmtiEnvThreadStateIterator it(state);
1670   for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
1671     ets->compare_and_set_current_location(mh(), location, JVMTI_EVENT_SINGLE_STEP);


< prev index next >