[DFG] Add --verboseDFGFailure
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Jun 2017 16:55:20 +0000 (16:55 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Jun 2017 16:55:20 +0000 (16:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173155

Reviewed by Sam Weinig.

Similar to verboseFTLFailure, JSC should have verboseDFGFailure flag to show DFG failures quickly.

* dfg/DFGCapabilities.cpp:
(JSC::DFG::verboseCapabilities):
(JSC::DFG::debugFail):
* runtime/Options.cpp:
(JSC::recomputeDependentOptions):
* runtime/Options.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@217993 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGCapabilities.cpp
Source/JavaScriptCore/runtime/Options.cpp
Source/JavaScriptCore/runtime/Options.h

index 45ca219..1219a3f 100644 (file)
@@ -1,5 +1,21 @@
 2017-06-09  Yusuke Suzuki  <utatane.tea@gmail.com>
 
+        [DFG] Add --verboseDFGFailure
+        https://bugs.webkit.org/show_bug.cgi?id=173155
+
+        Reviewed by Sam Weinig.
+
+        Similar to verboseFTLFailure, JSC should have verboseDFGFailure flag to show DFG failures quickly.
+
+        * dfg/DFGCapabilities.cpp:
+        (JSC::DFG::verboseCapabilities):
+        (JSC::DFG::debugFail):
+        * runtime/Options.cpp:
+        (JSC::recomputeDependentOptions):
+        * runtime/Options.h:
+
+2017-06-09  Yusuke Suzuki  <utatane.tea@gmail.com>
+
         [JSC] Drop OS(DARWIN) for VM_TAG_FOR_WEBASSEMBLY_MEMORY
         https://bugs.webkit.org/show_bug.cgi?id=173147
 
index 8dec8de..8c126c1 100644 (file)
@@ -92,10 +92,15 @@ bool canUseOSRExitFuzzing(CodeBlock* codeBlock)
     return codeBlock->ownerScriptExecutable()->canUseOSRExitFuzzing();
 }
 
+static bool verboseCapabilities()
+{
+    return verboseCompilationEnabled() || Options::verboseDFGFailure();
+}
+
 inline void debugFail(CodeBlock* codeBlock, OpcodeID opcodeID, CapabilityLevel result)
 {
-    if (Options::verboseCompilation() && !canCompile(result))
-        dataLog("Cannot compile code block ", *codeBlock, " because of opcode ", opcodeNames[opcodeID], "\n");
+    if (verboseCapabilities() && !canCompile(result))
+        dataLog("DFG rejecting opcode in ", *codeBlock, " because of opcode ", opcodeNames[opcodeID], "\n");
 }
 
 CapabilityLevel capabilityLevel(OpcodeID opcodeID, CodeBlock* codeBlock, Instruction* pc)
index 9f12df9..3cb7e79 100644 (file)
@@ -431,6 +431,7 @@ static void recomputeDependentOptions()
         || Options::reportFTLCompileTimes()
         || Options::reportDFGPhaseTimes()
         || Options::verboseCFA()
+        || Options::verboseDFGFailure()
         || Options::verboseFTLFailure())
         Options::alwaysComputeHash() = true;
     
index 0c5e313..6ff00c8 100644 (file)
@@ -187,6 +187,7 @@ typedef const char* optionString;
     v(bool, reportTotalCompileTimes, false, Normal, nullptr) \
     v(bool, verboseExitProfile, false, Normal, nullptr) \
     v(bool, verboseCFA, false, Normal, nullptr) \
+    v(bool, verboseDFGFailure, false, Normal, nullptr) \
     v(bool, verboseFTLToJSThunk, false, Normal, nullptr) \
     v(bool, verboseFTLFailure, false, Normal, nullptr) \
     v(bool, alwaysComputeHash, false, Normal, nullptr) \