Title: [92038] trunk/Source/_javascript_Core
Revision
92038
Author
[email protected]
Date
2011-07-29 19:00:35 -0700 (Fri, 29 Jul 2011)

Log Message

DFG JIT verbose mode provides no details about predictions
https://bugs.webkit.org/show_bug.cgi?id=65389

Reviewed by Darin Adler.

Added a print-out of the predictions to the IR dump, with names as follows:
"p-bottom" = the parser made no predictions
"p-int32" = the parser predicted int32
... (same for array, cell, double, number)
"p-top" = the parser made conflicting predictions which will be ignored.

* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGGraph.h:
(JSC::DFG::predictionToString):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (92037 => 92038)


--- trunk/Source/_javascript_Core/ChangeLog	2011-07-30 01:26:02 UTC (rev 92037)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-07-30 02:00:35 UTC (rev 92038)
@@ -1,5 +1,23 @@
 2011-07-29  Filip Pizlo  <[email protected]>
 
+        DFG JIT verbose mode provides no details about predictions
+        https://bugs.webkit.org/show_bug.cgi?id=65389
+
+        Reviewed by Darin Adler.
+        
+        Added a print-out of the predictions to the IR dump, with names as follows:
+        "p-bottom" = the parser made no predictions
+        "p-int32" = the parser predicted int32
+        ... (same for array, cell, double, number)
+        "p-top" = the parser made conflicting predictions which will be ignored.
+
+        * dfg/DFGGraph.cpp:
+        (JSC::DFG::Graph::dump):
+        * dfg/DFGGraph.h:
+        (JSC::DFG::predictionToString):
+
+2011-07-29  Filip Pizlo  <[email protected]>
+
         DFG JIT does not have any way of undoing double speculation.
         https://bugs.webkit.org/show_bug.cgi?id=65334
 

Modified: trunk/Source/_javascript_Core/dfg/DFGGraph.cpp (92037 => 92038)


--- trunk/Source/_javascript_Core/dfg/DFGGraph.cpp	2011-07-30 01:26:02 UTC (rev 92037)
+++ trunk/Source/_javascript_Core/dfg/DFGGraph.cpp	2011-07-30 02:00:35 UTC (rev 92038)
@@ -132,7 +132,12 @@
         hasPrinted = true;
     }
 
-    printf(")\n");
+    printf(")");
+    
+    if (node.hasLocal())
+        printf("  predicting %s", predictionToString(getPrediction(node.local())));
+    
+    printf("\n");
 }
 
 void Graph::dump(CodeBlock* codeBlock)

Modified: trunk/Source/_javascript_Core/dfg/DFGGraph.h (92037 => 92038)


--- trunk/Source/_javascript_Core/dfg/DFGGraph.h	2011-07-30 01:26:02 UTC (rev 92037)
+++ trunk/Source/_javascript_Core/dfg/DFGGraph.h	2011-07-30 02:00:35 UTC (rev 92038)
@@ -76,6 +76,26 @@
     return !!(value & PredictNumber) && !(value & ~PredictNumber);
 }
 
+#ifndef NDEBUG
+inline const char* predictionToString(PredictedType value)
+{
+    switch (value) {
+    case PredictNone:
+        return "p-bottom";
+    case PredictCell:
+        return "p-cell";
+    case PredictArray:
+        return "p-array";
+    case PredictInt32:
+        return "p-int32";
+    case PredictNumber:
+        return "p-number";
+    default:
+        return "p-top";
+    }
+}
+#endif
+
 struct PredictionSlot {
 public:
     PredictionSlot()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to