changeset 19588:9d7677b9f9eb

LIRPhase: include timer in scope.
author Josef Eisl <josef.eisl@jku.at>
date Tue, 24 Feb 2015 19:24:15 +0100
parents 884188ccc9d8
children 8ca837a82a9d
files graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LIRPhase.java
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LIRPhase.java	Wed Feb 25 11:29:27 2015 +0100
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LIRPhase.java	Tue Feb 24 19:24:15 2015 +0100
@@ -78,10 +78,12 @@
     }
 
     public final <B extends AbstractBlockBase<B>> void apply(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder, C context, boolean dumpLIR) {
-        try (TimerCloseable a = timer.start(); Scope s = Debug.scope(getName(), this); Closeable c = memUseTracker.start()) {
-            run(target, lirGenRes, codeEmittingOrder, linearScanOrder, context);
-            if (dumpLIR && Debug.isDumpEnabled(PHASE_DUMP_LEVEL)) {
-                Debug.dump(PHASE_DUMP_LEVEL, lirGenRes.getLIR(), "After phase %s", getName());
+        try (Scope s = Debug.scope(getName(), this)) {
+            try (TimerCloseable a = timer.start(); Closeable c = memUseTracker.start()) {
+                run(target, lirGenRes, codeEmittingOrder, linearScanOrder, context);
+                if (dumpLIR && Debug.isDumpEnabled(PHASE_DUMP_LEVEL)) {
+                    Debug.dump(PHASE_DUMP_LEVEL, lirGenRes.getLIR(), "After phase %s", getName());
+                }
             }
         } catch (Throwable e) {
             throw Debug.handle(e);