diff graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java @ 11487:21738e530332

added metrics for timing front-end, back-end and code installation (GRAAL-448)
author Doug Simon <doug.simon@oracle.com>
date Wed, 28 Aug 2013 22:35:01 +0200
parents e7d07c9bb779
children 1d64bfb3f481
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java	Wed Aug 28 22:34:22 2013 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java	Wed Aug 28 22:35:01 2013 +0200
@@ -113,6 +113,8 @@
      */
     public static final DebugTimer CompilationTime = Debug.timer("CompilationTime");
 
+    public static final DebugTimer CodeInstallationTime = Debug.timer("CodeInstallation");
+
     public void runCompilation() {
         /*
          * no code must be outside this try/finally because it could happen otherwise that
@@ -164,7 +166,9 @@
                 }
             }
 
-            installMethod(result);
+            try (TimerCloseable b = CodeInstallationTime.start()) {
+                installMethod(result);
+            }
             stats.finish(method);
         } catch (BailoutException bailout) {
             Debug.metric("Bailouts").increment();