# HG changeset patch # User Josef Eisl # Date 1449768127 -3600 # Node ID f2a8407253da65ae5abe53cd73821dd17f3766a6 # Parent 40f5437c92e9e49f199feafe268f4c44a7a9d447 TraceRA: move resolution: count number of created stack slots. diff -r 40f5437c92e9 -r f2a8407253da graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/TraceGlobalMoveResolver.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/TraceGlobalMoveResolver.java Thu Dec 10 18:21:43 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/TraceGlobalMoveResolver.java Thu Dec 10 18:22:07 2015 +0100 @@ -48,6 +48,7 @@ import jdk.vm.ci.meta.Value; import com.oracle.graal.debug.Debug; +import com.oracle.graal.debug.DebugMetric; import com.oracle.graal.debug.Indent; import com.oracle.graal.lir.LIRInsertionBuffer; import com.oracle.graal.lir.LIRInstruction; @@ -62,6 +63,8 @@ */ final class TraceGlobalMoveResolver extends TraceGlobalMoveResolutionPhase.MoveResolver { + private static final DebugMetric cycleBreakingSlotsAllocated = Debug.metric("TraceRA[cycleBreakingSlotsAllocated(global)]"); + private int insertIdx; private LIRInsertionBuffer insertionBuffer; // buffer where moves are inserted @@ -388,6 +391,7 @@ Value from = mappingFrom.get(spillCandidate); try (Indent indent = Debug.logAndIndent("BreakCycle: %s", from)) { VirtualStackSlot spillSlot = frameMapBuilder.allocateSpillSlot(from.getLIRKind()); + cycleBreakingSlotsAllocated.increment(); if (Debug.isLogEnabled()) { Debug.log("created new slot for spilling: %s", spillSlot); } diff -r 40f5437c92e9 -r f2a8407253da graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/lsra/TraceLocalMoveResolver.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/lsra/TraceLocalMoveResolver.java Thu Dec 10 18:21:43 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/lsra/TraceLocalMoveResolver.java Thu Dec 10 18:22:07 2015 +0100 @@ -45,6 +45,7 @@ import jdk.vm.ci.meta.Value; import com.oracle.graal.debug.Debug; +import com.oracle.graal.debug.DebugMetric; import com.oracle.graal.debug.Indent; import com.oracle.graal.lir.LIRInsertionBuffer; import com.oracle.graal.lir.LIRInstruction; @@ -56,6 +57,8 @@ */ final class TraceLocalMoveResolver { + private static final DebugMetric cycleBreakingSlotsAllocated = Debug.metric("TraceRA[cycleBreakingSlotsAllocated(local)]"); + private static final int STACK_SLOT_IN_CALLER_FRAME_IDX = -1; private final TraceLinearScan allocator; @@ -428,6 +431,7 @@ if (spillSlot1 == null) { spillSlot1 = getAllocator().getFrameMapBuilder().allocateSpillSlot(fromInterval1.kind()); fromInterval1.setSpillSlot(spillSlot1); + cycleBreakingSlotsAllocated.increment(); } spillInterval(spillCandidate, fromInterval1, spillSlot1); return;