Title: [185618] trunk/Source/_javascript_Core
Revision
185618
Author
fpi...@apple.com
Date
2015-06-16 15:13:19 -0700 (Tue, 16 Jun 2015)

Log Message

Unreviewed, roll out unintended JSC change from https://trac.webkit.org/changeset/185425.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::hasExitSite):
(JSC::CodeBlock::exitProfile):
(JSC::CodeBlock::numberOfExitSites): Deleted.
* bytecode/DFGExitProfile.cpp:
(JSC::DFG::ExitProfile::add):
* bytecode/DFGExitProfile.h:
(JSC::DFG::ExitProfile::hasExitSite):
(JSC::DFG::ExitProfile::size): Deleted.
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::inliningCost):
* runtime/Options.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (185617 => 185618)


--- trunk/Source/_javascript_Core/ChangeLog	2015-06-16 22:08:53 UTC (rev 185617)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-06-16 22:13:19 UTC (rev 185618)
@@ -1,3 +1,20 @@
+2015-06-16  Filip Pizlo  <fpi...@apple.com>
+
+        Unreviewed, roll out unintended JSC change from https://trac.webkit.org/changeset/185425.
+
+        * bytecode/CodeBlock.h:
+        (JSC::CodeBlock::hasExitSite):
+        (JSC::CodeBlock::exitProfile):
+        (JSC::CodeBlock::numberOfExitSites): Deleted.
+        * bytecode/DFGExitProfile.cpp:
+        (JSC::DFG::ExitProfile::add):
+        * bytecode/DFGExitProfile.h:
+        (JSC::DFG::ExitProfile::hasExitSite):
+        (JSC::DFG::ExitProfile::size): Deleted.
+        * dfg/DFGByteCodeParser.cpp:
+        (JSC::DFG::ByteCodeParser::inliningCost):
+        * runtime/Options.h:
+
 2015-06-16  Mark Lam  <mark....@apple.com>
 
         Use NakedPtr<Exception>& to return exception results.

Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.h (185617 => 185618)


--- trunk/Source/_javascript_Core/bytecode/CodeBlock.h	2015-06-16 22:08:53 UTC (rev 185617)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.h	2015-06-16 22:13:19 UTC (rev 185618)
@@ -537,12 +537,6 @@
         ConcurrentJITLocker locker(m_lock);
         return hasExitSite(locker, site);
     }
-    
-    size_t numberOfExitSites() const
-    {
-        ConcurrentJITLocker locker(m_lock);
-        return m_exitProfile.size();
-    }
 
     DFG::ExitProfile& exitProfile() { return m_exitProfile; }
 

Modified: trunk/Source/_javascript_Core/bytecode/DFGExitProfile.cpp (185617 => 185618)


--- trunk/Source/_javascript_Core/bytecode/DFGExitProfile.cpp	2015-06-16 22:08:53 UTC (rev 185617)
+++ trunk/Source/_javascript_Core/bytecode/DFGExitProfile.cpp	2015-06-16 22:13:19 UTC (rev 185618)
@@ -44,9 +44,15 @@
         m_frequentExitSites->append(site);
         return true;
     }
-
-    // Always add even if it's a duplicate. The side-effect of doing this is it gives us a
-    // complete count of the number of times we've exited here. 
+    
+    // Don't add it if it's already there. This is O(n), but that's OK, because we
+    // know that the total number of places where code exits tends to not be large,
+    // and this code is only used when recompilation is triggered.
+    for (unsigned i = 0; i < m_frequentExitSites->size(); ++i) {
+        if (m_frequentExitSites->at(i) == site)
+            return false;
+    }
+    
     m_frequentExitSites->append(site);
     return true;
 }

Modified: trunk/Source/_javascript_Core/bytecode/DFGExitProfile.h (185617 => 185618)


--- trunk/Source/_javascript_Core/bytecode/DFGExitProfile.h	2015-06-16 22:08:53 UTC (rev 185617)
+++ trunk/Source/_javascript_Core/bytecode/DFGExitProfile.h	2015-06-16 22:13:19 UTC (rev 185618)
@@ -179,13 +179,6 @@
         return hasExitSite(locker, FrequentExitSite(bytecodeIndex, kind));
     }
     
-    size_t size() const
-    {
-        if (!m_frequentExitSites)
-            return 0;
-        return m_frequentExitSites->size();
-    }
-    
 private:
     friend class QueryableExitProfile;
     

Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (185617 => 185618)


--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2015-06-16 22:08:53 UTC (rev 185617)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2015-06-16 22:13:19 UTC (rev 185618)
@@ -1273,7 +1273,7 @@
         dataLog("    Inlining should be possible.\n");
     
     // It might be possible to inline.
-    return codeBlock->instructionCount() * pow(1 + codeBlock->numberOfExitSites(), Options::exitSitePowerForInlineCost());
+    return codeBlock->instructionCount();
 }
 
 template<typename ChecksFunctor>

Modified: trunk/Source/_javascript_Core/runtime/Options.h (185617 => 185618)


--- trunk/Source/_javascript_Core/runtime/Options.h	2015-06-16 22:08:53 UTC (rev 185617)
+++ trunk/Source/_javascript_Core/runtime/Options.h	2015-06-16 22:13:19 UTC (rev 185618)
@@ -204,14 +204,12 @@
     \
     v(unsigned, maximumOptimizationCandidateInstructionCount, 100000, nullptr) \
     \
-    v(unsigned, maximumFunctionForCallInlineCandidateInstructionCount, 250, nullptr) \
-    v(unsigned, maximumFunctionForClosureCallInlineCandidateInstructionCount, 180, nullptr) \
-    v(unsigned, maximumFunctionForConstructInlineCandidateInstructionCount, 180, nullptr) \
+    v(unsigned, maximumFunctionForCallInlineCandidateInstructionCount, 180, nullptr) \
+    v(unsigned, maximumFunctionForClosureCallInlineCandidateInstructionCount, 100, nullptr) \
+    v(unsigned, maximumFunctionForConstructInlineCandidateInstructionCount, 100, nullptr) \
     \
     v(unsigned, maximumFTLCandidateInstructionCount, 20000, nullptr) \
     \
-    v(double, exitSitePowerForInlineCost, 0.5, nullptr) \
-    \
     /* Depth of inline stack, so 1 = no inlining, 2 = one level, etc. */ \
     v(unsigned, maximumInliningDepth, 5, "maximum allowed inlining depth.  Depth of 1 means no inlining") \
     v(unsigned, maximumInliningRecursion, 2, nullptr) \
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to