Mercurial > hg > graal-compiler
changeset 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 | a11dcfb15695 |
files | graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/LSStackSlotAllocator.java |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
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 {