Commit 475b455b authored by mvstanton's avatar mvstanton Committed by Commit bot

[Turbofan] don't optimize from bytecode > 250K in size.

Compiles simply take too long, and such functions are liable to deopt
quickly.

BUG=chromium:686153

Review-Url: https://codereview.chromium.org/2667573002
Cr-Commit-Position: refs/heads/master@{#42779}
parent 626b95e3
......@@ -57,6 +57,12 @@ static const int kMaxSizeEarlyOpt =
static const int kMaxSizeEarlyOptIgnition =
5 * interpreter::Interpreter::kCodeSizeMultiplier;
// Certain functions are simply too big to be worth optimizing.
// We aren't using the code size multiplier here because there is no
// "kMaxSizeOpt" with which we would need to normalize. This constant is
// only for optimization decisions coming into TurboFan from Ignition.
static const int kMaxSizeOptIgnition = 250 * 1024;
#define OPTIMIZATION_REASON_LIST(V) \
V(DoNotOptimize, "do not optimize") \
V(HotAndStable, "hot and stable") \
......@@ -394,6 +400,10 @@ OptimizationReason RuntimeProfiler::ShouldOptimizeIgnition(
SharedFunctionInfo* shared = function->shared();
int ticks = shared->profiler_ticks();
if (shared->bytecode_array()->Size() > kMaxSizeOptIgnition) {
return OptimizationReason::kDoNotOptimize;
}
if (ticks >= kProfilerTicksBeforeOptimization) {
int typeinfo, generic, total, type_percentage, generic_percentage;
GetICCounts(function, &typeinfo, &generic, &total, &type_percentage,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment