To detect only JITed frames which are frames for codes compiled by a Java
Just In Time compiler (JIT compiler) in an environment in which the memory
available for use by a Java JIT compiler is limited, and JITed frames and
other frames coexist in a thread stack. When the JIT compiler causes short
of memory in a specific thread, all the threads are temporarily suspended.
Then, each thread is searched for active methods, i.e., in each thread
stack JITed code addresses are searched for. When there is no JITed last
frame records, each frame is scanned from the position pointed by the
current stack pointer SP to the bottom of the stack. When there is a list,
it is scanned from the position pointed by the current stack pointer SP to
the address of a JITed frame pointed by the latest JITed last frame record
in the list. Following this, a frame pointed by a JITed last frame record
and a JITed frame that can be traced from the pointed frame are detected.
In FIG. 6, a stack area above the JITed frame of JITed code E (an area
from the SP to a frame with the label E) is a frame of non-JITed code
called from a point at which it is determined that a JITed last frame
record will not be formed, or a frame of an exception handler that handles
a Java exception mapped to a CPU exception.