| Method from sun.jvm.hotspot.runtime.x86.X86Frame Detail: |
public Address addressOfInterpreterFrameCPCache() {
return addressOfStackSlot(INTERPRETER_FRAME_CACHE_OFFSET);
}
|
public Address addressOfInterpreterFrameExpressionStack() {
Address monitorEnd = interpreterFrameMonitorEnd().address();
return monitorEnd.addOffsetTo(-1 * VM.getVM().getAddressSize());
}
|
public Address addressOfInterpreterFrameLocals() {
return addressOfStackSlot(INTERPRETER_FRAME_LOCALS_OFFSET);
}
|
public Address addressOfInterpreterFrameMDX() {
return addressOfStackSlot(INTERPRETER_FRAME_MDX_OFFSET);
}
|
public Address addressOfInterpreterFrameMethod() {
return addressOfStackSlot(INTERPRETER_FRAME_METHOD_OFFSET);
}
|
public Address addressOfInterpreterFrameTOS() {
return getSP();
}
|
public Address addressOfInterpreterFrameTOSAt(int slot) {
return addressOfInterpreterFrameTOS().addOffsetTo(slot * VM.getVM().getAddressSize());
}
Expression stack from top down |
protected Address addressOfSavedOopResult() {
// offset is 2 for compiler2 and 3 for compiler1
return getSP().addOffsetTo((VM.getVM().isClientCompiler() ? 2 : 3) *
VM.getVM().getAddressSize());
}
|
protected Address addressOfSavedReceiver() {
return getSP().addOffsetTo(-4 * VM.getVM().getAddressSize());
}
|
public Object clone() {
X86Frame frame = new X86Frame();
frame.raw_sp = raw_sp;
frame.raw_unextendedSP = raw_unextendedSP;
frame.raw_fp = raw_fp;
frame.raw_fp = raw_fp;
frame.pc = pc;
frame.deoptimized = deoptimized;
return frame;
}
|
public Address compiledArgumentToLocationPD(VMReg reg,
RegisterMap regMap,
int argSize) {
if (VM.getVM().isCore() || VM.getVM().isClientCompiler()) {
throw new RuntimeException("Should not reach here");
}
return oopMapRegToLocation(reg, regMap);
}
|
public boolean equals(Object arg) {
if (arg == null) {
return false;
}
if (!(arg instanceof X86Frame)) {
return false;
}
X86Frame other = (X86Frame) arg;
return (AddressOps.equal(getSP(), other.getSP()) &&
AddressOps.equal(getUnextendedSP(), other.getUnextendedSP()) &&
AddressOps.equal(getFP(), other.getFP()) &&
AddressOps.equal(getPC(), other.getPC()));
}
|
public long frameSize() {
return (getSenderSP().minus(getSP()) / VM.getVM().getAddressSize());
}
|
public JavaCallWrapper getEntryFrameCallWrapper() {
return new X86JavaCallWrapper(addressOfStackSlot(ENTRY_FRAME_CALL_WRAPPER_OFFSET).getAddressAt(0));
}
|
public Address getFP() {
return raw_fp;
}
|
public Address getID() {
return raw_sp;
}
|
public int getInterpreterFrameBCI() {
// FIXME: this is not atomic with respect to GC and is unsuitable
// for use in a non-debugging, or reflective, system. Need to
// figure out how to express this.
Address bcp = addressOfInterpreterFrameBCX().getAddressAt(0);
OopHandle methodHandle = addressOfInterpreterFrameMethod().getOopHandleAt(0);
Method method = (Method) VM.getVM().getObjectHeap().newOop(methodHandle);
return bcpToBci(bcp, method);
}
|
public int getInterpreterFrameExpressionStackDirection() {
return -1;
}
|
public Address getInterpreterFrameSenderSP() {
if (Assert.ASSERTS_ENABLED) {
Assert.that(isInterpretedFrame(), "interpreted frame expected");
}
return addressOfStackSlot(INTERPRETER_FRAME_SENDER_SP_OFFSET).getAddressAt(0);
}
|
public Address getLink() {
return addressOfStackSlot(LINK_OFFSET).getAddressAt(0);
}
|
public Address getNativeParamAddr(int idx) {
return addressOfStackSlot(NATIVE_FRAME_INITIAL_PARAM_OFFSET + idx);
}
|
public Address getSP() {
return raw_sp;
}
|
public Address getSenderPC() {
return getSenderPCAddr().getAddressAt(0);
}
|
public Address getSenderPCAddr() {
return addressOfStackSlot(RETURN_ADDR_OFFSET);
}
|
public Address getSenderSP() {
return addressOfStackSlot(SENDER_SP_OFFSET);
}
|
public String getSignalNameDbg() {
return null;
}
|
public int getSignalNumberDbg() {
return 0;
}
|
public Address getUnextendedSP() {
return raw_unextendedSP;
}
|
protected boolean hasSenderPD() {
// FIXME
// Check for null ebp? Need to do some tests.
return true;
}
|
public int hashCode() {
if (raw_sp == null) {
return 0;
}
return raw_sp.hashCode();
}
|
public BasicObjectLock interpreterFrameMonitorBegin() {
return new BasicObjectLock(addressOfStackSlot(INTERPRETER_FRAME_MONITOR_BLOCK_BOTTOM_OFFSET));
}
|
public BasicObjectLock interpreterFrameMonitorEnd() {
Address result = addressOfStackSlot(INTERPRETER_FRAME_MONITOR_BLOCK_TOP_OFFSET).getAddressAt(0);
if (Assert.ASSERTS_ENABLED) {
// make sure the pointer points inside the frame
Assert.that(AddressOps.gt(getFP(), result), "result must < than frame pointer");
Assert.that(AddressOps.lte(getSP(), result), "result must >= than stack pointer");
}
return new BasicObjectLock(result);
}
|
public int interpreterFrameMonitorSize() {
return BasicObjectLock.size();
}
|
public boolean isInterpretedFrameValid() {
if (Assert.ASSERTS_ENABLED) {
Assert.that(isInterpretedFrame(), "Not an interpreted frame");
}
// These are reasonable sanity checks
if (getFP() == null || getFP().andWithMask(0x3) != null) {
return false;
}
if (getSP() == null || getSP().andWithMask(0x3) != null) {
return false;
}
if (getFP().addOffsetTo(INTERPRETER_FRAME_INITIAL_SP_OFFSET * VM.getVM().getAddressSize()).lessThan(getSP())) {
return false;
}
// These are hacks to keep us out of trouble.
// The problem with these is that they mask other problems
if (getFP().lessThanOrEqual(getSP())) {
// this attempts to deal with unsigned comparison above
return false;
}
if (getFP().minus(getSP()) > 4096 * VM.getVM().getAddressSize()) {
// stack frames shouldn't be large.
return false;
}
return true;
}
|
public boolean isSignalHandlerFrameDbg() {
return false;
}
|
public Frame sender(RegisterMap regMap,
CodeBlob cb) {
X86RegisterMap map = (X86RegisterMap) regMap;
if (Assert.ASSERTS_ENABLED) {
Assert.that(map != null, "map must be set");
}
// Default is we done have to follow them. The sender_for_xxx will
// update it accordingly
map.setIncludeArgumentOops(false);
if (isEntryFrame()) return senderForEntryFrame(map);
if (isInterpretedFrame()) return senderForInterpreterFrame(map);
if (!VM.getVM().isCore()) {
if(cb == null) {
cb = VM.getVM().getCodeCache().findBlob(getPC());
} else {
if (Assert.ASSERTS_ENABLED) {
Assert.that(cb.equals(VM.getVM().getCodeCache().findBlob(getPC())), "Must be the same");
}
}
if (cb != null) {
return senderForCompiledFrame(map, cb);
}
}
// Must be native-compiled frame, i.e. the marshaling code for native
// methods that exists in the core system.
return new X86Frame(getSenderSP(), getLink(), getSenderPC());
}
|
public String toString() {
return "sp: " + (getSP() == null? "null" : getSP().toString()) +
", unextendedSP: " + (getUnextendedSP() == null? "null" : getUnextendedSP().toString()) +
", fp: " + (getFP() == null? "null" : getFP().toString()) +
", pc: " + (pc == null? "null" : pc.toString());
}
|