--- old/agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java Wed Aug 19 10:34:57 2009 +++ new/agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java Wed Aug 19 10:34:57 2009 @@ -52,10 +52,11 @@ private List objects; // ArrayList - public ScopeDesc(NMethod code, int decodeOffset) { + public ScopeDesc(NMethod code, int decodeOffset, boolean reexecute) { this.code = code; this.decodeOffset = decodeOffset; this.objects = decodeObjectValues(DebugInformationRecorder.SERIALIZED_NULL); + this.reexecute = reexecute; // Decode header DebugInfoReadStream stream = streamAt(decodeOffset); @@ -62,7 +63,7 @@ senderDecodeOffset = stream.readInt(); method = (Method) VM.getVM().getObjectHeap().newOop(stream.readOopHandle()); - setBCIAndReexecute(stream.readInt()); + bci = stream.readBCI(); // Decode offsets for body and sender localsDecodeOffset = stream.readInt(); expressionsDecodeOffset = stream.readInt(); @@ -69,10 +70,11 @@ monitorsDecodeOffset = stream.readInt(); } - public ScopeDesc(NMethod code, int decodeOffset, int objectDecodeOffset) { + public ScopeDesc(NMethod code, int decodeOffset, int objectDecodeOffset, boolean reexecute) { this.code = code; this.decodeOffset = decodeOffset; this.objects = decodeObjectValues(objectDecodeOffset); + this.reexecute = reexecute; // Decode header DebugInfoReadStream stream = streamAt(decodeOffset); @@ -79,7 +81,7 @@ senderDecodeOffset = stream.readInt(); method = (Method) VM.getVM().getObjectHeap().newOop(stream.readOopHandle()); - setBCIAndReexecute(stream.readInt()); + bci = stream.readBCI(); // Decode offsets for body and sender localsDecodeOffset = stream.readInt(); expressionsDecodeOffset = stream.readInt(); @@ -86,10 +88,10 @@ monitorsDecodeOffset = stream.readInt(); } - public NMethod getNMethod() { return code; } - public Method getMethod() { return method; } - public int getBCI() { return bci; } - public boolean getReexecute() {return reexecute;} + 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() { @@ -117,7 +119,7 @@ return null; } - return new ScopeDesc(code, senderDecodeOffset); + return new ScopeDesc(code, senderDecodeOffset, false); } /** Returns where the scope was decoded */ @@ -151,8 +153,8 @@ public void printValueOn(PrintStream tty) { tty.print("ScopeDesc for "); method.printValueOn(tty); - tty.println(" @bci " + bci); - tty.println(" reexecute: " + reexecute); + tty.print(" @bci " + bci); + tty.println(" reexecute=" + reexecute); } // FIXME: add more accessors @@ -160,12 +162,6 @@ //-------------------------------------------------------------------------------- // 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); }