Title: [233762] trunk/Source/_javascript_Core
Revision
233762
Author
[email protected]
Date
2018-07-11 22:40:20 -0700 (Wed, 11 Jul 2018)

Log Message

Unreviewed, rolling out r233714.
https://bugs.webkit.org/show_bug.cgi?id=187579

it made tests time out (Requested by pizlo on #webkit).

Reverted changeset:

"Change the reoptimization backoff base to 1.3 from 2"
https://bugs.webkit.org/show_bug.cgi?id=187540
https://trac.webkit.org/changeset/233714

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (233761 => 233762)


--- trunk/Source/_javascript_Core/ChangeLog	2018-07-12 05:27:17 UTC (rev 233761)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-07-12 05:40:20 UTC (rev 233762)
@@ -1,3 +1,16 @@
+2018-07-11  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r233714.
+        https://bugs.webkit.org/show_bug.cgi?id=187579
+
+        it made tests time out (Requested by pizlo on #webkit).
+
+        Reverted changeset:
+
+        "Change the reoptimization backoff base to 1.3 from 2"
+        https://bugs.webkit.org/show_bug.cgi?id=187540
+        https://trac.webkit.org/changeset/233714
+
 2018-07-11  Carlos Garcia Campos  <[email protected]>
 
         [GLIB] Add API to allow creating variadic functions

Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (233761 => 233762)


--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2018-07-12 05:27:17 UTC (rev 233761)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2018-07-12 05:40:20 UTC (rev 233762)
@@ -2136,6 +2136,7 @@
 unsigned CodeBlock::reoptimizationRetryCounter() const
 {
 #if ENABLE(JIT)
+    ASSERT(m_reoptimizationRetryCounter <= Options::reoptimizationRetryCounterMax());
     return m_reoptimizationRetryCounter;
 #else
     return 0;
@@ -2173,6 +2174,8 @@
 void CodeBlock::countReoptimization()
 {
     m_reoptimizationRetryCounter++;
+    if (m_reoptimizationRetryCounter > Options::reoptimizationRetryCounterMax())
+        m_reoptimizationRetryCounter = Options::reoptimizationRetryCounterMax();
 }
 
 unsigned CodeBlock::numberOfDFGCompiles()
@@ -2291,7 +2294,7 @@
     return clipThreshold(
         static_cast<double>(desiredThreshold) *
         optimizationThresholdScalingFactor() *
-        pow(Options::reoptimizationBackoffBase(), reoptimizationRetryCounter()));
+        (1 << reoptimizationRetryCounter()));
 }
 
 bool CodeBlock::checkIfOptimizationThresholdReached()

Modified: trunk/Source/_javascript_Core/runtime/Options.cpp (233761 => 233762)


--- trunk/Source/_javascript_Core/runtime/Options.cpp	2018-07-12 05:27:17 UTC (rev 233761)
+++ trunk/Source/_javascript_Core/runtime/Options.cpp	2018-07-12 05:40:20 UTC (rev 233762)
@@ -471,6 +471,18 @@
     if (Options::alwaysUseShadowChicken())
         Options::maximumInliningDepth() = 1;
 
+    // Compute the maximum value of the reoptimization retry counter. This is simply
+    // the largest value at which we don't overflow the execute counter, when using it
+    // to left-shift the execution counter by this amount. Currently the value ends
+    // up being 18, so this loop is not so terrible; it probably takes up ~100 cycles
+    // total on a 32-bit processor.
+    Options::reoptimizationRetryCounterMax() = 0;
+    while ((static_cast<int64_t>(Options::thresholdForOptimizeAfterLongWarmUp()) << (Options::reoptimizationRetryCounterMax() + 1)) <= static_cast<int64_t>(std::numeric_limits<int32_t>::max()))
+        Options::reoptimizationRetryCounterMax()++;
+
+    ASSERT((static_cast<int64_t>(Options::thresholdForOptimizeAfterLongWarmUp()) << Options::reoptimizationRetryCounterMax()) > 0);
+    ASSERT((static_cast<int64_t>(Options::thresholdForOptimizeAfterLongWarmUp()) << Options::reoptimizationRetryCounterMax()) <= static_cast<int64_t>(std::numeric_limits<int32_t>::max()));
+
 #if !defined(NDEBUG)
     if (Options::maxSingleAllocationSize())
         fastSetMaxSingleAllocationSize(Options::maxSingleAllocationSize());

Modified: trunk/Source/_javascript_Core/runtime/Options.h (233761 => 233762)


--- trunk/Source/_javascript_Core/runtime/Options.h	2018-07-12 05:27:17 UTC (rev 233761)
+++ trunk/Source/_javascript_Core/runtime/Options.h	2018-07-12 05:40:20 UTC (rev 233762)
@@ -361,7 +361,7 @@
     v(unsigned, osrExitCountForReoptimization, 100, Normal, nullptr) \
     v(unsigned, osrExitCountForReoptimizationFromLoop, 5, Normal, nullptr) \
     \
-    v(double, reoptimizationBackoffBase, 1.3, Normal, nullptr) \
+    v(unsigned, reoptimizationRetryCounterMax, 0, Normal, nullptr)  \
     \
     v(unsigned, minimumOptimizationDelay, 1, Normal, nullptr) \
     v(unsigned, maximumOptimizationDelay, 5, Normal, nullptr) \
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to