changeset 11600:60f4c505993e

remove global phase metric, replaced with per-phase metrics
author Doug Simon <doug.simon@oracle.com>
date Tue, 10 Sep 2013 22:13:46 +0200
parents d9342daa5078
children ceecc37b44d7
files graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningPhase.java graal/com.oracle.graal.phases/src/com/oracle/graal/phases/BasePhase.java
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningPhase.java	Tue Sep 10 22:06:18 2013 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningPhase.java	Tue Sep 10 22:13:46 2013 +0200
@@ -67,7 +67,7 @@
     private static final DebugMetric metricInliningPerformed = Debug.metric("InliningPerformed");
     private static final DebugMetric metricInliningConsidered = Debug.metric("InliningConsidered");
     private static final DebugMetric metricInliningStoppedByMaxDesiredSize = Debug.metric("InliningStoppedByMaxDesiredSize");
-    private static final DebugMetric metricInliningRuns = Debug.metric("Runs");
+    private static final DebugMetric metricInliningRuns = Debug.metric("InliningRuns");
 
     public InliningPhase(CanonicalizerPhase canonicalizer) {
         this(new GreedyInliningPolicy(null), canonicalizer);
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/BasePhase.java	Tue Sep 10 22:06:18 2013 +0200
+++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/BasePhase.java	Tue Sep 10 22:13:46 2013 +0200
@@ -37,8 +37,8 @@
 
     private final String name;
 
-    private static final DebugMetric metricPhaseRuns = Debug.metric("Runs");
     private final DebugTimer phaseTimer;
+    private final DebugMetric phaseMetric;
 
     private static final Pattern NAME_PATTERN = Pattern.compile("[A-Z][A-Za-z0-9]+");
 
@@ -56,12 +56,14 @@
         }
         assert checkName(name);
         phaseTimer = Debug.timer("Phase_" + name);
+        phaseMetric = Debug.metric("Phase_" + name);
     }
 
     protected BasePhase(String name) {
         assert checkName(name);
         this.name = name;
         phaseTimer = Debug.timer("Phase_" + name);
+        phaseMetric = Debug.metric("Phase_" + name);
     }
 
     protected String getDetailedName() {
@@ -79,7 +81,7 @@
 
                 public void run() {
                     BasePhase.this.run(graph, context);
-                    metricPhaseRuns.increment();
+                    phaseMetric.increment();
                     if (dumpGraph) {
                         Debug.dump(graph, "After phase %s", name);
                     }