Bug 939614: IonMonkey: Properly spew recompiling instead of analyzing, r=jandem
☠☠ backed out by ad9dc3482bd4 ☠ ☠
authorHannes Verschore <hv1989@gmail.com>
Thu, 12 Dec 2013 15:14:13 +0100
changeset 160233 50cc92857bf755774420a86dc1556b77fcdce4fe
parent 160232 62a6568217da8eee2fd6a977659a65e2a18ddcd8
child 160234 a0522e28d9700ea00fb061fb718689767fc4f3c8
push id25827
push userkwierso@gmail.com
push dateFri, 13 Dec 2013 03:13:04 +0000
treeherdermozilla-central@1bc33fa19b24 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs939614
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 939614: IonMonkey: Properly spew recompiling instead of analyzing, r=jandem
js/src/jit/IonBuilder.cpp
js/src/jit/IonOptimizationLevels.h
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -604,18 +604,27 @@ IonBuilder::build()
 {
     if (!init())
         return false;
 
     setCurrentAndSpecializePhis(newBlock(pc));
     if (!current)
         return false;
 
-    IonSpew(IonSpew_Scripts, "Analyzing script %s:%d (%p) (usecount=%d)",
-            script()->filename(), script()->lineno(), (void *)script(), (int)script()->getUseCount());
+#ifdef DEBUG
+    if (info().executionMode() == SequentialExecution && script()->hasIonScript()) {
+        IonSpew(IonSpew_Scripts, "Recompiling script %s:%d (%p) (usecount=%d, level=%s)",
+                script()->filename(), script()->lineno(), (void *)script(),
+                (int)script()->getUseCount(), OptimizationLevelString(optimizationInfo().level()));
+    } else {
+        IonSpew(IonSpew_Scripts, "Analyzing script %s:%d (%p) (usecount=%d, level=%s)",
+                script()->filename(), script()->lineno(), (void *)script(),
+                (int)script()->getUseCount(), OptimizationLevelString(optimizationInfo().level()));
+    }
+#endif
 
     if (!initParameters())
         return false;
 
     // Initialize local variables.
     for (uint32_t i = 0; i < info().nlocals(); i++) {
         MConstant *undef = MConstant::New(alloc(), UndefinedValue());
         current->add(undef);
--- a/js/src/jit/IonOptimizationLevels.h
+++ b/js/src/jit/IonOptimizationLevels.h
@@ -19,16 +19,33 @@ namespace jit {
 enum OptimizationLevel
 {
     Optimization_DontCompile,
     Optimization_Normal,
     Optimization_AsmJS,
     Optimization_Count
 };
 
+#ifdef DEBUG
+inline const char *
+OptimizationLevelString(OptimizationLevel level)
+{
+    switch (level) {
+      case Optimization_DontCompile:
+        return "Optimization_DontCompile";
+      case Optimization_Normal:
+        return "Optimization_Normal";
+      case Optimization_AsmJS:
+        return "Optimization_AsmJS";
+      default:
+        MOZ_ASSUME_UNREACHABLE("Invalid OptimizationLevel");
+    }
+}
+#endif
+
 class OptimizationInfo
 {
   public:
     OptimizationLevel level_;
 
     // Toggles whether Effective Address Analysis is performed.
     bool eaa_;