# HG changeset patch # User Gilles Duboscq # Date 1367846733 -7200 # Node ID d6bf345d58c137e6b7ffe2ce44fca79a13322d53 # Parent f0ef8f58a1d909796c131317466ab172c785749c# Parent f64a3fec4e428a289a91e84d122cd153ac78d0fc Merge diff -r f64a3fec4e42 -r d6bf345d58c1 graal/com.oracle.graal.loop/src/com/oracle/graal/loop/CountedLoopInfo.java --- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/CountedLoopInfo.java Mon May 06 12:52:22 2013 +0200 +++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/CountedLoopInfo.java Mon May 06 15:25:33 2013 +0200 @@ -140,7 +140,7 @@ cond = graph.unique(new IntegerLessThanNode(v1, end)); } else { assert iv.direction() == Direction.Down; - IntegerArithmeticNode v1 = add(ConstantNode.forIntegerKind(kind, kind.getMinValue(), graph), add(iv.strideNode(), one)); + IntegerArithmeticNode v1 = add(ConstantNode.forIntegerKind(kind, kind.getMinValue(), graph), sub(one, iv.strideNode())); if (oneOff) { v1 = add(v1, one); } diff -r f64a3fec4e42 -r d6bf345d58c1 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ExpandLogicPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ExpandLogicPhase.java Mon May 06 12:52:22 2013 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ExpandLogicPhase.java Mon May 06 15:25:33 2013 +0200 @@ -34,6 +34,7 @@ for (LogicBinaryNode logic : graph.getNodes(LogicBinaryNode.class)) { processBinary(logic); } + assert graph.getNodes(LogicBinaryNode.class).isEmpty(); } private static void processBinary(LogicBinaryNode binary) { diff -r f64a3fec4e42 -r d6bf345d58c1 src/share/vm/runtime/deoptimization.cpp --- a/src/share/vm/runtime/deoptimization.cpp Mon May 06 12:52:22 2013 +0200 +++ b/src/share/vm/runtime/deoptimization.cpp Mon May 06 15:25:33 2013 +0200 @@ -1344,8 +1344,19 @@ // Ensure that we can record deopt. history: bool create_if_missing = ProfileTraps; + methodHandle profiled_method; +#ifdef GRAAL + if (nm->is_compiled_by_graal()) { + profiled_method = nm->method(); + } else { + profiled_method = trap_method; + } +#else + profiled_method = trap_method; +#endif + MethodData* trap_mdo = - get_method_data(thread, trap_method, create_if_missing); + get_method_data(thread, profiled_method, create_if_missing); // Log a message Events::log_deopt_message(thread, "Uncommon trap: reason=%s action=%s pc=" INTPTR_FORMAT " method=%s @ %d", @@ -1538,7 +1549,6 @@ bool inc_recompile_count = false; ProfileData* pdata = NULL; if (ProfileTraps && update_trap_state && trap_mdo != NULL) { - assert(trap_mdo == get_method_data(thread, trap_method, false), "sanity"); uint this_trap_count = 0; bool maybe_prior_trap = false; bool maybe_prior_recompile = false;