Title: [233714] trunk/Source/_javascript_Core
- Revision
- 233714
- Author
- fpi...@apple.com
- Date
- 2018-07-10 17:16:07 -0700 (Tue, 10 Jul 2018)
Log Message
Change the reoptimization backoff base to 1.3 from 2
https://bugs.webkit.org/show_bug.cgi?id=187540
Reviewed by Saam Barati.
I have data that hints at this being a speed-up on JetStream, ARES-6, and Speedometer2.
I also have data that hints that a backoff base of 1 might be even better, but I think that
we want to keep *some* backoff in case we find ourselves in an unmitigated recomp loop.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::reoptimizationRetryCounter const):
(JSC::CodeBlock::countReoptimization):
(JSC::CodeBlock::adjustedCounterValue):
* runtime/Options.cpp:
(JSC::recomputeDependentOptions):
* runtime/Options.h:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (233713 => 233714)
--- trunk/Source/_javascript_Core/ChangeLog 2018-07-11 00:09:11 UTC (rev 233713)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-07-11 00:16:07 UTC (rev 233714)
@@ -1,3 +1,23 @@
+2018-07-10 Filip Pizlo <fpi...@apple.com>
+
+ Change the reoptimization backoff base to 1.3 from 2
+ https://bugs.webkit.org/show_bug.cgi?id=187540
+
+ Reviewed by Saam Barati.
+
+ I have data that hints at this being a speed-up on JetStream, ARES-6, and Speedometer2.
+
+ I also have data that hints that a backoff base of 1 might be even better, but I think that
+ we want to keep *some* backoff in case we find ourselves in an unmitigated recomp loop.
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::reoptimizationRetryCounter const):
+ (JSC::CodeBlock::countReoptimization):
+ (JSC::CodeBlock::adjustedCounterValue):
+ * runtime/Options.cpp:
+ (JSC::recomputeDependentOptions):
+ * runtime/Options.h:
+
2018-07-10 Mark Lam <mark....@apple.com>
[32-bit JSC tests] ASSERTION FAILED: !butterfly->propertyStorage()[-I - 1].get() under JSC::ObjectInitializationScope::verifyPropertiesAreInitialized.
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (233713 => 233714)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2018-07-11 00:09:11 UTC (rev 233713)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2018-07-11 00:16:07 UTC (rev 233714)
@@ -2136,7 +2136,6 @@
unsigned CodeBlock::reoptimizationRetryCounter() const
{
#if ENABLE(JIT)
- ASSERT(m_reoptimizationRetryCounter <= Options::reoptimizationRetryCounterMax());
return m_reoptimizationRetryCounter;
#else
return 0;
@@ -2174,8 +2173,6 @@
void CodeBlock::countReoptimization()
{
m_reoptimizationRetryCounter++;
- if (m_reoptimizationRetryCounter > Options::reoptimizationRetryCounterMax())
- m_reoptimizationRetryCounter = Options::reoptimizationRetryCounterMax();
}
unsigned CodeBlock::numberOfDFGCompiles()
@@ -2294,7 +2291,7 @@
return clipThreshold(
static_cast<double>(desiredThreshold) *
optimizationThresholdScalingFactor() *
- (1 << reoptimizationRetryCounter()));
+ pow(Options::reoptimizationBackoffBase(), reoptimizationRetryCounter()));
}
bool CodeBlock::checkIfOptimizationThresholdReached()
Modified: trunk/Source/_javascript_Core/runtime/Options.cpp (233713 => 233714)
--- trunk/Source/_javascript_Core/runtime/Options.cpp 2018-07-11 00:09:11 UTC (rev 233713)
+++ trunk/Source/_javascript_Core/runtime/Options.cpp 2018-07-11 00:16:07 UTC (rev 233714)
@@ -471,18 +471,6 @@
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 (233713 => 233714)
--- trunk/Source/_javascript_Core/runtime/Options.h 2018-07-11 00:09:11 UTC (rev 233713)
+++ trunk/Source/_javascript_Core/runtime/Options.h 2018-07-11 00:16:07 UTC (rev 233714)
@@ -361,7 +361,7 @@
v(unsigned, osrExitCountForReoptimization, 100, Normal, nullptr) \
v(unsigned, osrExitCountForReoptimizationFromLoop, 5, Normal, nullptr) \
\
- v(unsigned, reoptimizationRetryCounterMax, 0, Normal, nullptr) \
+ v(double, reoptimizationBackoffBase, 1.3, Normal, nullptr) \
\
v(unsigned, minimumOptimizationDelay, 1, Normal, nullptr) \
v(unsigned, maximumOptimizationDelay, 5, Normal, nullptr) \
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes