Index: src/runtime-profiler.cc |
diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc |
index ab76cc90649901d3f562de3f94c973ba1661e254..5cae78a75c4b9ee8b27a477189920a1f98ce7468 100644 |
--- a/src/runtime-profiler.cc |
+++ b/src/runtime-profiler.cc |
@@ -26,6 +26,9 @@ static const int kProfilerTicksBeforeBaseline = 1; |
// Number of times a function has to be seen on the stack before it is |
// optimized. |
static const int kProfilerTicksBeforeOptimization = 2; |
+// Number of times a interpreted function has to be seen on the stack before |
+// it is optimized (with Turbofan, ignition is only optimized with Turbofan). |
+static const int kProfilerTicksBeforeOptimizingInterpretedFunction = 4; |
mythria
2016/10/26 08:17:15
In my experiments on Octane I found 4 to be a good
|
// If the function optimization was disabled due to high deoptimization count, |
// but the function is hot and has been seen on the stack this number of times, |
// then we try to reenable optimization for this function. |
@@ -36,6 +39,7 @@ static const int kProfilerTicksBeforeReenablingOptimization = 250; |
static const int kTicksWhenNotEnoughTypeInfo = 100; |
// We only have one byte to store the number of ticks. |
STATIC_ASSERT(kProfilerTicksBeforeOptimization < 256); |
+STATIC_ASSERT(kProfilerTicksBeforeOptimizingInterpretedFunction < 256); |
STATIC_ASSERT(kProfilerTicksBeforeReenablingOptimization < 256); |
STATIC_ASSERT(kTicksWhenNotEnoughTypeInfo < 256); |
@@ -43,12 +47,12 @@ STATIC_ASSERT(kTicksWhenNotEnoughTypeInfo < 256); |
static const int kOSRCodeSizeAllowanceBase = |
100 * FullCodeGenerator::kCodeSizeMultiplier; |
mythria
2016/10/26 08:17:15
In my initial patch, I also changed this metric fo
|
static const int kOSRCodeSizeAllowanceBaseIgnition = |
- 100 * interpreter::Interpreter::kCodeSizeMultiplier; |
+ 10 * interpreter::Interpreter::kCodeSizeMultiplier; |
mythria
2016/10/26 08:17:15
This and the change to OSRCodeSizeAllowancePerTIck
|
static const int kOSRCodeSizeAllowancePerTick = |
4 * FullCodeGenerator::kCodeSizeMultiplier; |
static const int kOSRCodeSizeAllowancePerTickIgnition = |
- 4 * interpreter::Interpreter::kCodeSizeMultiplier; |
+ 2 * interpreter::Interpreter::kCodeSizeMultiplier; |
// Maximum size in bytes of generated code for a function to be optimized |
// the very first time it is seen on the stack. |
@@ -404,7 +408,7 @@ OptimizationReason RuntimeProfiler::ShouldOptimizeIgnition( |
SharedFunctionInfo* shared = function->shared(); |
int ticks = shared->profiler_ticks(); |
- if (ticks >= kProfilerTicksBeforeOptimization) { |
+ if (ticks >= kProfilerTicksBeforeOptimizingInterpretedFunction) { |
int typeinfo, generic, total, type_percentage, generic_percentage; |
GetICCounts(function, &typeinfo, &generic, &total, &type_percentage, |
&generic_percentage); |