public abstract class Frame
extends java.lang.Object
implements java.lang.Cloneable
A frame represents a physical stack frame (an activation). Frames can be C or Java frames, and the Java frames can be interpreted or compiled. In contrast, vframes represent source-level activations, so that one physical frame can correspond to multiple source level frames because of inlining.
NOTE that this is not a VMObject and does not wrap an Address -- this is an actual port of the VM's Frame code to Java.
NOTE also that this is incomplete -- just trying to get reading of interpreted frames working for now, so all non-core and setter methods are removed for now. (FIXME)
Modifier and Type | Field and Description |
---|---|
protected boolean |
deoptimized |
protected Address |
pc
Program counter (the next instruction after the call)
|
protected Address |
raw_sp
A raw stack pointer.
|
Constructor and Description |
---|
Frame() |
Modifier and Type | Method and Description |
---|---|
abstract Address |
addressOfInterpreterFrameCPCache()
Constant pool cache
|
abstract Address |
addressOfInterpreterFrameExpressionStack()
Find receiver for an invoke when arguments are just pushed on
stack (i.e., callee stack-frame is not setup)
|
Address |
addressOfInterpreterFrameExpressionStackSlot(int slot) |
Address |
addressOfInterpreterFrameLocal(int slot) |
abstract Address |
addressOfInterpreterFrameLocals() |
abstract Address |
addressOfInterpreterFrameMethod()
Current method
|
abstract Address |
addressOfInterpreterFrameTOS()
Top of expression stack
|
abstract Address |
addressOfInterpreterFrameTOSAt(int slot)
Expression stack from top down
|
protected abstract Address |
addressOfSavedOopResult() |
protected abstract Address |
addressOfSavedReceiver() |
Address |
addressOfStackSlot(int slot)
Returns the address of the requested "slot" on the stack.
|
protected int |
bcpToBci(Address bcp,
ConstMethod cm) |
protected int |
bcpToBci(Address bcp,
Method m) |
boolean |
canBeDeoptimized()
tells whether this frame can be deoptimized
|
CodeBlob |
cb() |
abstract java.lang.Object |
clone() |
boolean |
entryFrameIsFirst()
Tells whether there is another chunk of Delta stack above
|
abstract boolean |
equals(java.lang.Object arg)
testers -- platform dependent
|
abstract long |
frameSize()
returns the frame size in stack slots
|
abstract JavaCallWrapper |
getEntryFrameCallWrapper() |
abstract Address |
getFP() |
abstract Address |
getID() |
int |
getIntAt(int slot)
Fetches the (Java) int at the requested slot
|
abstract int |
getInterpreterFrameBCI()
Byte code index.
|
ConstantPoolCache |
getInterpreterFrameCPCache()
Constant pool cache
|
abstract int |
getInterpreterFrameExpressionStackDirection() |
int |
getInterpreterFrameExpressionStackSize()
FIXME: is this portable?
|
Method |
getInterpreterFrameMethod()
Current method
|
abstract Address |
getInterpreterFrameSenderSP() |
abstract Address |
getLink()
Link (i.e., the pointer to the previous frame)
|
OopHandle |
getOopHandleAt(int slot)
Fetches the OopHandle at the requested slot
|
Address |
getPC()
pc: Returns the pc at which this frame will continue normally.
|
OopHandle |
getSavedOopResult() |
OopHandle |
getSavedReceiver() |
abstract Address |
getSenderPC()
Return address
|
abstract Address |
getSenderSP()
Returns the stack pointer of the calling frame
|
abstract java.lang.String |
getSignalNameDbg()
If this is a signal handler frame (again, on a platform with a
notion of signals), get the name of the signal.
|
abstract int |
getSignalNumberDbg()
If this is a signal handler frame (again, on a platform with a
notion of signals), get the signal number.
|
abstract Address |
getSP() |
abstract Address |
getUnextendedSP()
The frame's original SP, before any extension by an interpreted
callee; used for packing debug info into vframeArray objects and
vframeArray lookup.
|
protected abstract boolean |
hasSenderPD()
Platform-dependent query indicating whether this frame has a
sender.
|
abstract BasicObjectLock |
interpreterFrameMonitorBegin() |
abstract BasicObjectLock |
interpreterFrameMonitorEnd() |
abstract int |
interpreterFrameMonitorSize()
NOTE: this returns a size in BYTES in this system!
|
void |
interpreterFramePrintOn(java.io.PrintStream tty) |
boolean |
isCompiledFrame() |
boolean |
isDeoptimized() |
boolean |
isEntryFrame()
Java frame called from C?
|
boolean |
isFirstFrame()
oldest frame? (has no sender) FIXME: this is modified from the
C++ code to handle the debugging situation where we try to
traverse the stack for, for example, the signal thread, and
don't find any valid Java frames.
|
boolean |
isFirstJavaFrame()
same for Java frame
|
boolean |
isInterpretedFrame()
type testers
|
abstract boolean |
isInterpretedFrameValid()
performs sanity checks on interpreted frames.
|
boolean |
isJavaFrame() |
boolean |
isNativeFrame() |
boolean |
isRuntimeFrame() |
abstract boolean |
isSignalHandlerFrameDbg()
This is an addition for debugging purposes on platforms which
have the notion of signals.
|
BasicObjectLock |
nextMonitorInInterpreterFrame(BasicObjectLock cur) |
Address |
oopMapRegToLocation(VMReg reg,
RegisterMap regMap)
Conversion from an VMReg::Name to physical stack location
|
void |
oopsDo(AddressVisitor oopVisitor,
RegisterMap map) |
void |
oopsInterpretedArgumentsDo(Symbol signature,
boolean isStatic,
AddressVisitor f) |
static int |
pcReturnOffset() |
BasicObjectLock |
previousMonitorInInterpreterFrame(BasicObjectLock cur) |
void |
print() |
void |
printOn(java.io.PrintStream tty) |
void |
printValue() |
void |
printValueOn(java.io.PrintStream tty) |
Frame |
realSender(RegisterMap map)
returns the sender, but skips conversion frames
|
Frame |
sender(RegisterMap map)
equivalent to sender(map, null)
|
abstract Frame |
sender(RegisterMap map,
CodeBlob nm)
returns the sending frame
|
void |
setPC(Address newpc) |
boolean |
shouldBeDeoptimized()
tells whether this frame is marked for deoptimization
|
protected Address raw_sp
protected Address pc
protected boolean deoptimized
public static int pcReturnOffset()
protected int bcpToBci(Address bcp, ConstMethod cm)
public abstract java.lang.Object clone()
clone
in class java.lang.Object
public Address getPC()
public void setPC(Address newpc)
public boolean isDeoptimized()
public CodeBlob cb()
public abstract Address getSP()
public abstract Address getID()
public abstract Address getFP()
public abstract boolean equals(java.lang.Object arg)
equals
in class java.lang.Object
public boolean isInterpretedFrame()
public boolean isJavaFrame()
public boolean isEntryFrame()
public boolean isNativeFrame()
public boolean isCompiledFrame()
public boolean isRuntimeFrame()
public boolean isFirstFrame()
public boolean isFirstJavaFrame()
public abstract boolean isSignalHandlerFrameDbg()
public abstract int getSignalNumberDbg()
public abstract java.lang.String getSignalNameDbg()
public abstract boolean isInterpretedFrameValid()
public boolean shouldBeDeoptimized()
public boolean canBeDeoptimized()
public abstract Frame sender(RegisterMap map, CodeBlob nm)
public Frame sender(RegisterMap map)
public Frame realSender(RegisterMap map)
protected abstract boolean hasSenderPD()
public Address addressOfStackSlot(int slot)
public OopHandle getOopHandleAt(int slot)
public int getIntAt(int slot)
public abstract long frameSize()
public abstract Address getLink()
public abstract Address getSenderPC()
public abstract Address getUnextendedSP()
public abstract Address getSenderSP()
public abstract Address addressOfInterpreterFrameLocals()
public Address addressOfInterpreterFrameLocal(int slot)
public abstract int getInterpreterFrameBCI()
public abstract Address addressOfInterpreterFrameExpressionStack()
public abstract int getInterpreterFrameExpressionStackDirection()
public Address addressOfInterpreterFrameExpressionStackSlot(int slot)
public abstract Address addressOfInterpreterFrameTOS()
public abstract Address addressOfInterpreterFrameTOSAt(int slot)
public int getInterpreterFrameExpressionStackSize()
public abstract Address getInterpreterFrameSenderSP()
public abstract BasicObjectLock interpreterFrameMonitorBegin()
public abstract BasicObjectLock interpreterFrameMonitorEnd()
public abstract int interpreterFrameMonitorSize()
public BasicObjectLock nextMonitorInInterpreterFrame(BasicObjectLock cur)
public BasicObjectLock previousMonitorInInterpreterFrame(BasicObjectLock cur)
public abstract Address addressOfInterpreterFrameMethod()
public Method getInterpreterFrameMethod()
public abstract Address addressOfInterpreterFrameCPCache()
public ConstantPoolCache getInterpreterFrameCPCache()
public abstract JavaCallWrapper getEntryFrameCallWrapper()
public boolean entryFrameIsFirst()
protected abstract Address addressOfSavedOopResult()
protected abstract Address addressOfSavedReceiver()
public OopHandle getSavedOopResult()
public OopHandle getSavedReceiver()
public void oopsInterpretedArgumentsDo(Symbol signature, boolean isStatic, AddressVisitor f)
public Address oopMapRegToLocation(VMReg reg, RegisterMap regMap)
public void oopsDo(AddressVisitor oopVisitor, RegisterMap map)
public void printValue()
public void printValueOn(java.io.PrintStream tty)
public void print()
public void printOn(java.io.PrintStream tty)
public void interpreterFramePrintOn(java.io.PrintStream tty)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.