Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1446)

Unified Diff: src/runtime-profiler.cc

Issue 2445203003: [Interpreter] Tune runtime profiler parameters for turbofan and OSR. (Closed)
Patch Set: Resetting the values for crankshaft pipeline for OSR. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/interpreter/interpreter.h ('K') | « src/interpreter/interpreter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« src/interpreter/interpreter.h ('K') | « src/interpreter/interpreter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698