Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/LSStackSlotAllocator.java @ 19035:9a3bde73e05a
StackSlotAllocation: add metric for uninitialized stack slots.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Thu, 29 Jan 2015 10:56:07 +0100 |
parents | 94ca6ce786ee |
children | cc2b817de0b5 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/LSStackSlotAllocator.java Thu Jan 29 10:38:01 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/LSStackSlotAllocator.java Thu Jan 29 10:56:07 2015 +0100 @@ -58,6 +58,11 @@ // @formatter:on } + /** + * The number of allocated stack slots. + */ + static final DebugMetric uninitializedSlots = Debug.metric("StackSlotAllocator[uninitializedSlots]"); + public void allocateStackSlots(FrameMapBuilderTool builder, LIRGenerationResult res) { new Allocator(res.getLIR(), builder).allocate(); } @@ -287,6 +292,9 @@ if (flags.contains(OperandFlag.UNINITIALIZED)) { // Stack slot is marked uninitialized so we have to assume it is live all // the time. + if (Debug.isMeterEnabled() && !(interval.from() == 0 && interval.to() == maxOpId())) { + uninitializedSlots.increment(); + } interval.addDef(0); interval.addUse(maxOpId()); } else {