The information on these pages may be out of date, or may refer to
resources that have moved or have been made read-only.
For more information please refer to the Apache Attic
Here is a description of how popping a frame is currently implemented in the DRLVM tool interface (JVMTI). For a definition of the pop frame functionality, consult the JVMTI specification . For generic information on JVMTI in the DRL virtual machine and for definition of related terms, see the developer's guide.
Popping a stack frame becomes necessary when execution is in a native
function and a managed-to-native
frame (M2nFrame) is on the stack. This means that the JVMTI
component pops the M2nFrame and the Java frame above it. A frame is popped
each time the JVMTI function
called. The current pop-frame implementation is based on the exception
handling mechanism for transferring execution control. This way, VM pops
frames on the current thread only. To pop frames on other threads, VM
uses the M2nFrame flag system and callbacks.
To pop a frame on the current thread, refer to the following core functions:
||Finds register context for the previous frame using the stack iterator.|
||Transfers control to the saved register context for the popped frame.|
Transfers control to the previous frame. This function is
a simple and fast combination of sequential calls of
The state of a frame with regard to popping is indicated in the
field. This field can have the following values:
||The frame cannot be popped.|
||The frame can be popped but is not.|
||The frame is popped and the state of VM can be unpredictable and unexpected. JVMTI cannot work in this state and waits until the popped frame is resumed and the frame state is changed.|
||The frame is popped now but VM state is OK and JVMTI can work without thread resume.|
In the current implementation, popping a frame goes in the following way:
PopFrame()and does the following:
FRAME_POPABLE, which means that the frame can be popped.
hythread_safe_point()to stop the current thread in the safe point and wait until the thread is resumed by another thread.
 JVM Tool Interface Specification, http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html