Mercurial > hg > graal-jvmci-8
diff agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java @ 900:9987d9d5eb0e
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
Summary: developed a reexecute logic for the interpreter to reexecute the bytecode when deopt happens
Reviewed-by: kvn, never, jrose, twisti
author | cfang |
---|---|
date | Fri, 31 Jul 2009 17:12:33 -0700 |
parents | b109e761e927 |
children | 15bbd3f505c0 |
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java Fri Jul 31 12:04:07 2009 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java Fri Jul 31 17:12:33 2009 -0700 @@ -41,6 +41,7 @@ private NMethod code; private Method method; private int bci; + private boolean reexecute; /** Decoding offsets */ private int decodeOffset; private int senderDecodeOffset; @@ -61,7 +62,7 @@ senderDecodeOffset = stream.readInt(); method = (Method) VM.getVM().getObjectHeap().newOop(stream.readOopHandle()); - bci = stream.readBCI(); + setBCIAndReexecute(stream.readInt()); // Decode offsets for body and sender localsDecodeOffset = stream.readInt(); expressionsDecodeOffset = stream.readInt(); @@ -78,7 +79,7 @@ senderDecodeOffset = stream.readInt(); method = (Method) VM.getVM().getObjectHeap().newOop(stream.readOopHandle()); - bci = stream.readBCI(); + setBCIAndReexecute(stream.readInt()); // Decode offsets for body and sender localsDecodeOffset = stream.readInt(); expressionsDecodeOffset = stream.readInt(); @@ -88,6 +89,7 @@ public NMethod getNMethod() { return code; } public Method getMethod() { return method; } public int getBCI() { return bci; } + public boolean getReexecute() {return reexecute;} /** Returns a List<ScopeValue> */ public List getLocals() { @@ -150,6 +152,7 @@ tty.print("ScopeDesc for "); method.printValueOn(tty); tty.println(" @bci " + bci); + tty.println(" reexecute: " + reexecute); } // FIXME: add more accessors @@ -157,6 +160,11 @@ //-------------------------------------------------------------------------------- // Internals only below this point // + private void setBCIAndReexecute(int combination) { + int InvocationEntryBci = VM.getVM().getInvocationEntryBCI(); + bci = (combination >> 1) + InvocationEntryBci; + reexecute = (combination & 1)==1 ? true : false; + } private DebugInfoReadStream streamAt(int decodeOffset) { return new DebugInfoReadStream(code, decodeOffset, objects);