# HG changeset patch # User Lukas Stadler # Date 1307711530 -7200 # Node ID 3fa0e12d524af7adb054a4999259b15c86098519 # Parent 9b8f30608e62a4b90fd575bcd9fb0b50b9ce5935# Parent e6dd12397b1d7e711ce4cdc40328dde8182ad912 merge diff -r e6dd12397b1d -r 3fa0e12d524a graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java Fri Jun 10 10:28:31 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java Fri Jun 10 15:12:10 2011 +0200 @@ -38,6 +38,7 @@ import com.oracle.max.graal.compiler.globalstub.*; import com.oracle.max.graal.compiler.graph.*; import com.oracle.max.graal.compiler.ir.*; +import com.oracle.max.graal.compiler.ir.Deoptimize.DeoptAction; import com.oracle.max.graal.compiler.lir.*; import com.oracle.max.graal.compiler.util.*; import com.oracle.max.graal.compiler.value.*; @@ -207,8 +208,10 @@ public static class DeoptimizationStub { public final Label label = new Label(); public final LIRDebugInfo info; + public final DeoptAction action; - public DeoptimizationStub(FrameState state) { + public DeoptimizationStub(DeoptAction action, FrameState state) { + this.action = action; info = new LIRDebugInfo(state); } } @@ -395,7 +398,7 @@ deoptimizationStubs = new ArrayList(); } - DeoptimizationStub stub = new DeoptimizationStub(state); + DeoptimizationStub stub = new DeoptimizationStub(DeoptAction.InvalidateReprofile, state); deoptimizationStubs.add(stub); throw new RuntimeException(); //lir.branch(x.condition.negate(), stub.label, stub.info); @@ -947,7 +950,8 @@ @Override public void visitDeoptimize(Deoptimize deoptimize) { - DeoptimizationStub stub = new DeoptimizationStub(lastState); + assert lastState != null : "deoptimize always needs a state"; + DeoptimizationStub stub = new DeoptimizationStub(deoptimize.action(), lastState); addDeoptimizationStub(stub); lir.branch(Condition.TRUE, stub.label, stub.info); } diff -r e6dd12397b1d -r 3fa0e12d524a graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Deoptimize.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Deoptimize.java Fri Jun 10 10:28:31 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Deoptimize.java Fri Jun 10 15:12:10 2011 +0200 @@ -31,10 +31,20 @@ private static final int INPUT_COUNT = 0; private static final int SUCCESSOR_COUNT = 0; - private String message; + public static enum DeoptAction { + None, // just interpret, do not invalidate nmethod + Recompile, // recompile the nmethod; need not invalidate + InvalidateReprofile, // invalidate the nmethod, reset IC, maybe recompile + InvalidateRecompile, // invalidate the nmethod, recompile (probably) + InvalidateStopCompiling, // invalidate the nmethod and do not compile + } - public Deoptimize(Graph graph) { + private String message; + private final DeoptAction action; + + public Deoptimize(DeoptAction action, Graph graph) { super(CiKind.Illegal, INPUT_COUNT, SUCCESSOR_COUNT, graph); + this.action = action; } public void setMessage(String message) { @@ -45,6 +55,10 @@ return message; } + public DeoptAction action() { + return action; + } + @Override public void accept(ValueVisitor v) { v.visitDeoptimize(this); @@ -62,7 +76,7 @@ @Override public Node copy(Graph into) { - Deoptimize x = new Deoptimize(into); + Deoptimize x = new Deoptimize(action, into); x.setMessage(message); return x; } diff -r e6dd12397b1d -r 3fa0e12d524a graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Value.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Value.java Fri Jun 10 10:28:31 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Value.java Fri Jun 10 15:12:10 2011 +0200 @@ -205,6 +205,4 @@ properties.put("operand", operand == null ? "null" : operand.toString()); return properties; } - - } diff -r e6dd12397b1d -r 3fa0e12d524a graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/GraphBuilderPhase.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/GraphBuilderPhase.java Fri Jun 10 10:28:31 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/GraphBuilderPhase.java Fri Jun 10 15:12:10 2011 +0200 @@ -34,6 +34,7 @@ import com.oracle.max.graal.compiler.graph.BlockMap.*; import com.oracle.max.graal.compiler.graph.BlockMap.Block; import com.oracle.max.graal.compiler.ir.*; +import com.oracle.max.graal.compiler.ir.Deoptimize.DeoptAction; import com.oracle.max.graal.compiler.schedule.*; import com.oracle.max.graal.compiler.util.*; import com.oracle.max.graal.compiler.value.*; @@ -82,7 +83,7 @@ private int nextBlockNumber; private Value methodSynchronizedObject; - private CiExceptionHandler syncHandler; + private CiExceptionHandler unwindHandler; private Block unwindBlock; private Block returnBlock; @@ -172,13 +173,13 @@ finishStartBlock(startBlock); // 4A.3 setup an exception handler to unlock the root method synchronized object - syncHandler = new CiExceptionHandler(0, method.code().length, Instruction.SYNCHRONIZATION_ENTRY_BCI, 0, null); + unwindHandler = new CiExceptionHandler(0, method.code().length, Instruction.SYNCHRONIZATION_ENTRY_BCI, 0, null); } else { // 4B.1 simply finish the start block finishStartBlock(startBlock); if (createUnwind) { - syncHandler = new CiExceptionHandler(0, method.code().length, Instruction.SYNCHRONIZATION_ENTRY_BCI, 0, null); + unwindHandler = new CiExceptionHandler(0, method.code().length, Instruction.SYNCHRONIZATION_ENTRY_BCI, 0, null); } } @@ -381,7 +382,7 @@ } if (firstHandler == null) { - firstHandler = syncHandler; + firstHandler = unwindHandler; } if (firstHandler != null) { @@ -436,7 +437,7 @@ // this is a load of class constant which might be unresolved RiType riType = (RiType) con; if (!riType.isResolved()) { - append(new Deoptimize(graph)); + append(new Deoptimize(DeoptAction.InvalidateRecompile, graph)); frameState.push(CiKind.Object, append(Constant.forObject(null, graph))); } else { frameState.push(CiKind.Object, append(new Constant(riType.getEncoding(Representation.JavaClass), graph))); @@ -737,7 +738,7 @@ NewInstance n = new NewInstance(type, cpi, constantPool, graph); frameState.apush(append(n)); } else { - append(new Deoptimize(graph)); + append(new Deoptimize(DeoptAction.InvalidateRecompile, graph)); frameState.apush(appendConstant(CiConstant.NULL_OBJECT)); } } @@ -756,7 +757,7 @@ NewArray n = new NewObjectArray(type, length, graph); frameState.apush(append(n)); } else { - append(new Deoptimize(graph)); + append(new Deoptimize(DeoptAction.InvalidateRecompile, graph)); frameState.apush(appendConstant(CiConstant.NULL_OBJECT)); } @@ -773,7 +774,7 @@ NewArray n = new NewMultiArray(type, dims, cpi, constantPool, graph); frameState.apush(append(n)); } else { - append(new Deoptimize(graph)); + append(new Deoptimize(DeoptAction.InvalidateRecompile, graph)); frameState.apush(appendConstant(CiConstant.NULL_OBJECT)); } } @@ -785,7 +786,7 @@ LoadField load = new LoadField(receiver, field, graph); appendOptimizedLoadField(kind, load); } else { - append(new Deoptimize(graph)); + append(new Deoptimize(DeoptAction.InvalidateRecompile, graph)); frameState.push(kind.stackKind(), append(Constant.defaultForKind(kind, graph))); } } @@ -797,7 +798,7 @@ StoreField store = new StoreField(receiver, field, value, graph); appendOptimizedStoreField(store); } else { - append(new Deoptimize(graph)); + append(new Deoptimize(DeoptAction.InvalidateRecompile, graph)); } } @@ -817,7 +818,7 @@ LoadField load = new LoadField(container, field, graph); appendOptimizedLoadField(kind, load); } else { - append(new Deoptimize(graph)); + append(new Deoptimize(DeoptAction.InvalidateRecompile, graph)); frameState.push(kind.stackKind(), append(Constant.defaultForKind(kind, graph))); } } @@ -831,7 +832,7 @@ StoreField store = new StoreField(container, field, value, graph); appendOptimizedStoreField(store); } else { - append(new Deoptimize(graph)); + append(new Deoptimize(DeoptAction.InvalidateRecompile, graph)); } } @@ -839,7 +840,7 @@ if (initialized) { return appendConstant(holder.getEncoding(representation)); } else { - append(new Deoptimize(graph)); + append(new Deoptimize(DeoptAction.InvalidateRecompile, graph)); return null; } } @@ -1202,7 +1203,7 @@ // Merge x = new Merge(graph); // x.setStateBefore(((StateSplit) block.firstInstruction).stateBefore()); // append(x); - append(new Deoptimize(graph)); + append(new Deoptimize(DeoptAction.InvalidateReprofile, graph)); } private void createUnwindBlock(Block block) { @@ -1239,7 +1240,7 @@ Instruction nextDispatch = createTarget(nextBlock, frameState); append(new ExceptionDispatch(frameState.stackAt(0), catchSuccessor, nextDispatch, block.handler.catchType(), graph)); } else { - Deoptimize deopt = new Deoptimize(graph); + Deoptimize deopt = new Deoptimize(DeoptAction.InvalidateRecompile, graph); deopt.setMessage("unresolved " + block.handler.catchType().name()); append(deopt); Instruction nextDispatch = createTarget(nextBlock, frameState); diff -r e6dd12397b1d -r 3fa0e12d524a graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/InliningPhase.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/InliningPhase.java Fri Jun 10 10:28:31 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/InliningPhase.java Fri Jun 10 15:12:10 2011 +0200 @@ -271,11 +271,17 @@ Node returnDuplicate = duplicates.get(returnNode); returnDuplicate.inputs().clearAll(); + Merge mergeAfter = new Merge(compilation.graph); + assert returnDuplicate.predecessors().size() == 1; Node returnPred = returnDuplicate.predecessors().get(0); int index = returnDuplicate.predecessorsIndex().get(0); - returnPred.successors().setAndClear(index, invoke, 0); + mergeAfter.successors().setAndClear(0, invoke, 0); + returnPred.successors().set(index, mergeAfter); + returnDuplicate.delete(); + + mergeAfter.setStateBefore(stateAfter); } if (exceptionEdge != null) { @@ -304,8 +310,11 @@ // adjust all frame states that were copied if (frameStates.size() > 0) { FrameState outerFrameState = stateAfter.duplicateModified(invoke.bci, invoke.kind); - for (Node frameState : frameStates) { - ((FrameState) duplicates.get(frameState)).setOuterFrameState(outerFrameState); + for (Node node : frameStates) { + FrameState frameState = (FrameState) duplicates.get(node); + if (!frameState.isDeleted()) { + frameState.setOuterFrameState(outerFrameState); + } } } diff -r e6dd12397b1d -r 3fa0e12d524a graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/target/amd64/AMD64LIRAssembler.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/target/amd64/AMD64LIRAssembler.java Fri Jun 10 10:28:31 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/target/amd64/AMD64LIRAssembler.java Fri Jun 10 15:12:10 2011 +0200 @@ -2070,6 +2070,27 @@ @Override public void emitDeoptizationStub(DeoptimizationStub stub) { masm.bind(stub.label); + int code; + switch(stub.action) { + case None: + code = 0; + break; + case Recompile: + code = 1; + break; + case InvalidateReprofile: + code = 2; + break; + case InvalidateRecompile: + code = 3; + break; + case InvalidateStopCompiling: + code = 4; + break; + default: + throw Util.shouldNotReachHere(); + } + masm.movq(rscratch1, code); directCall(CiRuntimeCall.Deoptimize, stub.info); shouldNotReachHere(); } diff -r e6dd12397b1d -r 3fa0e12d524a graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/value/FrameState.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/value/FrameState.java Fri Jun 10 10:28:31 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/value/FrameState.java Fri Jun 10 15:12:10 2011 +0200 @@ -509,6 +509,29 @@ } @Override + public Map getDebugProperties() { + Map properties = super.getDebugProperties(); + properties.put("bci", bci); + properties.put("method", CiUtil.format("%H.%n(%p):%r", method, false)); + StringBuilder str = new StringBuilder(); + for (int i = 0; i < localsSize(); i++) { + str.append(i == 0 ? "" : ", ").append(localAt(i) == null ? "_" : localAt(i).id()); + } + properties.put("locals", str.toString()); + str = new StringBuilder(); + for (int i = 0; i < stackSize(); i++) { + str.append(i == 0 ? "" : ", ").append(stackAt(i) == null ? "_" : stackAt(i).id()); + } + properties.put("stack", str.toString()); + str = new StringBuilder(); + for (int i = 0; i < locksSize(); i++) { + str.append(i == 0 ? "" : ", ").append(lockAt(i) == null ? "_" : lockAt(i).id()); + } + properties.put("locks", str.toString()); + return properties; + } + + @Override public Node copy(Graph into) { FrameState x = new FrameState(method, bci, localsSize, stackSize, locksSize, into); return x; diff -r e6dd12397b1d -r 3fa0e12d524a graal/com.oracle.max.graal.graph/src/com/oracle/max/graal/graph/Graph.java --- a/graal/com.oracle.max.graal.graph/src/com/oracle/max/graal/graph/Graph.java Fri Jun 10 10:28:31 2011 +0200 +++ b/graal/com.oracle.max.graal.graph/src/com/oracle/max/graal/graph/Graph.java Fri Jun 10 15:12:10 2011 +0200 @@ -155,6 +155,7 @@ for (Node node : nodes) { if (node != null && !replacements.containsKey(node)) { assert node.graph != this; + assert !node.isDeleted() : "trying to duplicate deleted node"; Node newNode = node.copy(this); assert newNode.getClass() == node.getClass(); newNodes.put(node, newNode); diff -r e6dd12397b1d -r 3fa0e12d524a graal/com.oracle.max.graal.graph/src/com/oracle/max/graal/graph/Node.java --- a/graal/com.oracle.max.graal.graph/src/com/oracle/max/graal/graph/Node.java Fri Jun 10 10:28:31 2011 +0200 +++ b/graal/com.oracle.max.graal.graph/src/com/oracle/max/graal/graph/Node.java Fri Jun 10 15:12:10 2011 +0200 @@ -130,7 +130,7 @@ public void delete() { assert !isDeleted(); - assert usages.size() == 0 && predecessors.size() == 0 : "id: " + id + ", usages: " + usages.size() + ", predecessors: " + predecessors().size(); + assert checkDeletion(); assert predecessorsIndex.size() == 0; for (int i = 0; i < inputs.size(); ++i) { inputs.set(i, Null); @@ -145,6 +145,23 @@ assert isDeleted(); } + private boolean checkDeletion() { + if (usages.size() != 0 || predecessors.size() != 0) { + System.out.println(this.shortName() + ", id: " + id + ", usages: " + usages.size() + ", predecessors: " + predecessors().size()); + System.out.println("usages:"); + for (Node n : usages()) { + System.out.print(n.id() + " (" + n.shortName() + ") "); + } + System.out.println("\npreds:"); + for (Node n : predecessors()) { + System.out.print(n.id() + " (" + n.shortName() + ") "); + } + System.out.println(); + return false; + } + return true; + } + public Node copy() { return copy(graph); } diff -r e6dd12397b1d -r 3fa0e12d524a graal/com.oracle.max.graal.graph/src/com/oracle/max/graal/graph/NodeArray.java --- a/graal/com.oracle.max.graal.graph/src/com/oracle/max/graal/graph/NodeArray.java Fri Jun 10 10:28:31 2011 +0200 +++ b/graal/com.oracle.max.graal.graph/src/com/oracle/max/graal/graph/NodeArray.java Fri Jun 10 15:12:10 2011 +0200 @@ -53,6 +53,7 @@ @Override public Node set(int index, Node node) { + assert !self().isDeleted() : "trying to set input/successor of deleted node: " + self().shortName(); assert node == Node.Null || node.graph == self().graph : "node is from different graph: (this=" + self() + ") and (node=" + node + ")"; assert node == Node.Null || node.id() != Node.DeletedID : "inserted node must not be deleted"; Node old = nodes[index]; @@ -145,6 +146,7 @@ } public void setAndClear(int index, Node clearedNode, int clearedIndex) { + assert !self().isDeleted() : "trying to setAndClear successor of deleted node: " + self().shortName(); assert self().successors == this; Node value = clearedNode.successors.get(clearedIndex); assert value != Node.Null; diff -r e6dd12397b1d -r 3fa0e12d524a graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotXirGenerator.java --- a/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotXirGenerator.java Fri Jun 10 10:28:31 2011 +0200 +++ b/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotXirGenerator.java Fri Jun 10 15:12:10 2011 +0200 @@ -621,8 +621,8 @@ asm.bindOutOfLine(slowPath); checkSubtype(asm, objHub, objHub, hub); asm.jneq(end, objHub, asm.o(null)); - XirOperand scratch = asm.createRegisterTemp("scratch", CiKind.Object, AMD64.r10); - asm.mov(scratch, object); + XirOperand scratch = asm.createRegisterTemp("scratch", CiKind.Word, AMD64.r10); + asm.mov(scratch, asm.createConstant(CiConstant.forWord(0))); asm.callRuntime(CiRuntimeCall.Deoptimize, null); asm.shouldNotReachHere(); @@ -711,6 +711,8 @@ asm.pload(kind, result, array, index, config.getArrayOffset(kind), Scale.fromInt(elemSize), implicitNullException); if (is(BOUNDS_CHECK, flags)) { asm.bindOutOfLine(failBoundsCheck); + XirOperand scratch = asm.createRegisterTemp("scratch", CiKind.Word, AMD64.r10); + asm.mov(scratch, asm.createConstant(CiConstant.forWord(0))); asm.callRuntime(CiRuntimeCall.Deoptimize, null); asm.shouldNotReachHere(); } @@ -902,8 +904,8 @@ asm.bindOutOfLine(slowStoreCheck); checkSubtype(asm, temp, valueHub, compHub); asm.jneq(store, temp, asm.w(0)); - XirOperand scratch = asm.createRegisterTemp("scratch", CiKind.Object, AMD64.r10); - asm.mov(scratch, valueHub); + XirOperand scratch = asm.createRegisterTemp("scratch", CiKind.Word, AMD64.r10); + asm.mov(scratch, asm.createConstant(CiConstant.forWord(0))); asm.callRuntime(CiRuntimeCall.Deoptimize, null); asm.jmp(store); } @@ -986,6 +988,8 @@ // -- out of line ------------------------------------------------------- if (is(BOUNDS_CHECK, flags)) { asm.bindOutOfLine(failBoundsCheck); + XirOperand scratch = asm.createRegisterTemp("scratch", CiKind.Word, AMD64.r10); + asm.mov(scratch, asm.createConstant(CiConstant.forWord(0))); asm.callRuntime(CiRuntimeCall.Deoptimize, null); asm.shouldNotReachHere(); } diff -r e6dd12397b1d -r 3fa0e12d524a graal/hotspot/hotspot Default.launch --- a/graal/hotspot/hotspot Default.launch Fri Jun 10 10:28:31 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r e6dd12397b1d -r 3fa0e12d524a src/cpu/x86/vm/c1_globals_x86.hpp --- a/src/cpu/x86/vm/c1_globals_x86.hpp Fri Jun 10 10:28:31 2011 +0200 +++ b/src/cpu/x86/vm/c1_globals_x86.hpp Fri Jun 10 15:12:10 2011 +0200 @@ -40,7 +40,7 @@ define_pd_global(bool, ProfileTraps, false); define_pd_global(bool, UseOnStackReplacement, true ); define_pd_global(bool, TieredCompilation, false); -define_pd_global(intx, CompileThreshold, 10000 ); // changed for GRAAL +define_pd_global(intx, CompileThreshold, 5000 ); // changed for GRAAL define_pd_global(intx, BackEdgeThreshold, 100000); define_pd_global(intx, OnStackReplacePercentage, 933 ); diff -r e6dd12397b1d -r 3fa0e12d524a src/cpu/x86/vm/sharedRuntime_x86_64.cpp --- a/src/cpu/x86/vm/sharedRuntime_x86_64.cpp Fri Jun 10 10:28:31 2011 +0200 +++ b/src/cpu/x86/vm/sharedRuntime_x86_64.cpp Fri Jun 10 15:12:10 2011 +0200 @@ -140,6 +140,7 @@ static int rax_offset_in_bytes(void) { return BytesPerInt * rax_off; } static int rdx_offset_in_bytes(void) { return BytesPerInt * rdx_off; } static int rbx_offset_in_bytes(void) { return BytesPerInt * rbx_off; } + static int r10_offset_in_bytes(void) { return BytesPerInt * r10_off; } static int xmm0_offset_in_bytes(void) { return BytesPerInt * xmm0_off; } static int return_offset_in_bytes(void) { return BytesPerInt * return_off; } @@ -2669,9 +2670,14 @@ // fetch_unroll_info needs to call last_java_frame() __ set_last_Java_frame(noreg, noreg, NULL); + // __ movl(c_rarg1, (int32_t)Deoptimization::Unpack_reexecute); // __ movl(r14, c_rarg1); // save into r14 for later call to unpack_frames - __ movl(c_rarg1, (int32_t)-1); + + assert(r10 == rscratch1, "scratch register should be r10"); + __ movptr(c_rarg1, Address(rsp, RegisterSaver::r10_offset_in_bytes())); + __ orq(c_rarg1, ~(int32_t)Deoptimization::make_trap_request(Deoptimization::Reason_unreached, Deoptimization::Action_none)); + __ notq(c_rarg1); __ movl(r14, (int32_t)Deoptimization::Unpack_reexecute); __ mov(c_rarg0, r15_thread); __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap))); diff -r e6dd12397b1d -r 3fa0e12d524a src/share/vm/oops/methodOop.cpp --- a/src/share/vm/oops/methodOop.cpp Fri Jun 10 10:28:31 2011 +0200 +++ b/src/share/vm/oops/methodOop.cpp Fri Jun 10 15:12:10 2011 +0200 @@ -206,6 +206,12 @@ } address methodOopDesc::bcp_from(int bci) const { +#ifdef ASSERT + if (!((is_native() && bci == 0) || (!is_native() && 0 <= bci && bci < code_size()))) { + char buf[1024]; + tty->print_cr("bci: %i, size: %i, method: %s", bci, code_size(), const_cast(this)->name_and_sig_as_C_string(buf, 1024)); + } +#endif // ASSERT assert((is_native() && bci == 0) || (!is_native() && 0 <= bci && bci < code_size()), "illegal bci"); address bcp = code_base() + bci; assert(is_native() && bcp == code_base() || contains(bcp), "bcp doesn't belong to this method");