Mercurial > hg > truffle
diff graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/SimpleStackSlotAllocator.java @ 21004:0e1e8879b655
{LS,Simple}StackSlotAllocator: use DebugMetric.isEnabled().
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Fri, 17 Apr 2015 12:04:12 +0200 |
parents | a33fe10c4d93 |
children | 47c5e0903d06 93c50cefb9e8 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/SimpleStackSlotAllocator.java Fri Apr 17 11:52:31 2015 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/stackslotalloc/SimpleStackSlotAllocator.java Fri Apr 17 12:04:12 2015 +0200 @@ -46,7 +46,7 @@ public void allocateStackSlots(FrameMapBuilderTool builder, LIRGenerationResult res) { StackSlot[] mapping = new StackSlot[builder.getNumberOfStackSlots()]; - long currentFrameSize = Debug.isMeterEnabled() ? builder.getFrameMap().currentFrameSize() : 0; + long currentFrameSize = allocatedFramesize.isEnabled() ? builder.getFrameMap().currentFrameSize() : 0; for (VirtualStackSlot virtualSlot : builder.getStackSlots()) { final StackSlot slot; if (virtualSlot instanceof SimpleVirtualStackSlot) { @@ -63,7 +63,9 @@ mapping[virtualSlot.getId()] = slot; } updateLIR(res, mapping); - allocatedFramesize.add(builder.getFrameMap().currentFrameSize() - currentFrameSize); + if (allocatedFramesize.isEnabled()) { + allocatedFramesize.add(builder.getFrameMap().currentFrameSize() - currentFrameSize); + } } protected void updateLIR(LIRGenerationResult res, StackSlot[] mapping) {