changeset 20118:3d3e16f6077a

Merge.
author Doug Simon <doug.simon@oracle.com>
date Wed, 01 Apr 2015 15:08:55 +0200
parents 20d39cfa8f1b (current diff) 30d6b0cd1394 (diff)
children 1b9841bb304d
files
diffstat 2 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LinearScan.java	Wed Apr 01 15:08:25 2015 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LinearScan.java	Wed Apr 01 15:08:55 2015 +0200
@@ -1745,7 +1745,7 @@
          */
         try (Indent indent = Debug.logAndIndent("LinearScan allocate")) {
 
-            try (Scope s = Debug.scope("LifetimeAnalysis")) {
+            try (Scope s = Debug.scope("LifetimeAnalysis"); DebugCloseable a = Debug.timer("LinearScan_LifetimeAnalysis").start()) {
                 numberInstructions();
                 printLir("Before register allocation", true);
                 computeLocalLiveSets();
@@ -1756,7 +1756,7 @@
                 throw Debug.handle(e);
             }
 
-            try (Scope s = Debug.scope("RegisterAllocation")) {
+            try (Scope s = Debug.scope("RegisterAllocation"); DebugCloseable a = Debug.timer("LinearScan_RegisterAllocation").start()) {
                 printIntervals("Before register allocation");
                 allocateRegisters();
             } catch (Throwable e) {
@@ -1764,14 +1764,14 @@
             }
 
             if (Options.LSRAOptimizeSpillPosition.getValue()) {
-                try (Scope s = Debug.scope("OptimizeSpillPosition")) {
+                try (Scope s = Debug.scope("OptimizeSpillPosition"); DebugCloseable a = Debug.timer("LinearScan_OptimizeSpillPosition").start()) {
                     optimizeSpillPosition();
                 } catch (Throwable e) {
                     throw Debug.handle(e);
                 }
             }
 
-            try (Scope s = Debug.scope("ResolveDataFlow")) {
+            try (Scope s = Debug.scope("ResolveDataFlow"); DebugCloseable a = Debug.timer("LinearScan_ResolveDataFlow").start()) {
                 resolveDataFlow();
             } catch (Throwable e) {
                 throw Debug.handle(e);
@@ -1787,14 +1787,14 @@
                     verify();
                 }
 
-                try (Scope s1 = Debug.scope("EliminateSpillMove")) {
+                try (Scope s1 = Debug.scope("EliminateSpillMove"); DebugCloseable a = Debug.timer("LinearScan_EliminateSpillMove").start()) {
                     eliminateSpillMoves();
                 } catch (Throwable e) {
                     throw Debug.handle(e);
                 }
                 printLir("After spill move elimination", true);
 
-                try (Scope s1 = Debug.scope("AssignLocations")) {
+                try (Scope s1 = Debug.scope("AssignLocations"); DebugCloseable a = Debug.timer("LinearScan_AssignLocations").start()) {
                     assignLocations();
                 } catch (Throwable e) {
                     throw Debug.handle(e);
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/PostAllocationOptimizationStage.java	Wed Apr 01 15:08:25 2015 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/PostAllocationOptimizationStage.java	Wed Apr 01 15:08:55 2015 +0200
@@ -40,8 +40,10 @@
         public static final NestedBooleanOptionValue LIROptRedundantMoveElimination = new NestedBooleanOptionValue(LIROptimization, true);
         @Option(help = "", type = OptionType.Debug)
         public static final NestedBooleanOptionValue LIROptNullCheckOptimizer = new NestedBooleanOptionValue(LIROptimization, true);
-        @Option(help = "", type = OptionType.Debug)
-        public static final OptionValue<Boolean> LIROptMoveProfiling = new OptionValue<>(false);
+        @Option(help = "Enables profiling of move types on LIR level. " +
+                       "Move types are for example stores (register to stack), " +
+                       "constant loads (constant to register) or copies (register to register).", type = OptionType.Debug)
+        public static final OptionValue<Boolean> LIRProfileMoves = new OptionValue<>(false);
         // @formatter:on
     }
 
@@ -58,7 +60,7 @@
         if (Options.LIROptNullCheckOptimizer.getValue()) {
             appendPhase(new NullCheckOptimizer());
         }
-        if (Options.LIROptMoveProfiling.getValue()) {
+        if (Options.LIRProfileMoves.getValue()) {
             appendPhase(new MoveProfiling());
         }
     }