public abstract class ParameterizedStackFrameVisitor<T> extends Object
StackFrameVisitor
that allows an arbitrary object to be passed through.Constructor and Description |
---|
ParameterizedStackFrameVisitor() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
unknownFrame(org.graalvm.word.Pointer sp,
org.graalvm.nativeimage.c.function.CodePointer ip,
DeoptimizedFrame deoptimizedFrame,
T data)
Called when no
frame metadata can be found for a frame. |
protected abstract boolean |
visitFrame(org.graalvm.word.Pointer sp,
org.graalvm.nativeimage.c.function.CodePointer ip,
CodeInfo codeInfo,
DeoptimizedFrame deoptimizedFrame,
T data)
Called for each frame that is visited.
|
protected abstract boolean visitFrame(org.graalvm.word.Pointer sp, org.graalvm.nativeimage.c.function.CodePointer ip, CodeInfo codeInfo, DeoptimizedFrame deoptimizedFrame, T data)
Uninterruptible
or executing within a safepoint, the frame on the stack could be
deoptimized at any safepoint check. Nevertheless, the passed codeInfo remains valid for
accessing information about the code at the (possibly outdated) instruction pointer (this is
ensured by the caller).sp
- The stack pointer of the frame being visited.ip
- The instruction pointer of the frame being visited.codeInfo
- Information on the code at the IP, for use with CodeInfoAccess
.deoptimizedFrame
- The information about a deoptimized frame, or null
if the
frame is not deoptimized.data
- An arbitrary data value passed through the stack walker.protected abstract boolean unknownFrame(org.graalvm.word.Pointer sp, org.graalvm.nativeimage.c.function.CodePointer ip, DeoptimizedFrame deoptimizedFrame, T data)
frame metadata
can be found for a frame. That usually means
that the VM is in an inconsistent state. The default implementation therefore aborts VM
execution with a fatal error. Stack walking for diagnostic purposes can override this method
to just report a message.sp
- The stack pointer of the frame being visited.ip
- The instruction pointer of the frame being visited.deoptimizedFrame
- The information about a deoptimized frame, or null
if the
frame is not deoptimized.data
- An arbitrary data value passed through the stack walker.