Chromium Code Reviews| Index: src/runtime-profiler.cc |
| diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc |
| index 70c61b1cebe5ded8306ad58bce21bdb13c18d2cf..f5b102556016d802cccbfc44a8ddfc74967a8f3f 100644 |
| --- a/src/runtime-profiler.cc |
| +++ b/src/runtime-profiler.cc |
| @@ -57,6 +57,9 @@ static const int kMaxSizeEarlyOpt = |
| static const int kMaxSizeEarlyOptIgnition = |
| 5 * interpreter::Interpreter::kCodeSizeMultiplier; |
| +// Certain functions are simply too big to be worth optimizing. |
| +static const int kMaxSizeOptFromBytecode = 250 * 1024; |
|
Michael Starzinger
2017/01/30 12:42:11
nit: Can we call this "kMaxSizeOptIgnition" to fol
mvstanton
2017/01/30 14:55:37
"We are not using the code size multiplier here be
|
| + |
| #define OPTIMIZATION_REASON_LIST(V) \ |
| V(DoNotOptimize, "do not optimize") \ |
| V(HotAndStable, "hot and stable") \ |
| @@ -394,6 +397,10 @@ OptimizationReason RuntimeProfiler::ShouldOptimizeIgnition( |
| SharedFunctionInfo* shared = function->shared(); |
| int ticks = shared->profiler_ticks(); |
| + if (shared->bytecode_array()->Size() > kMaxSizeOptFromBytecode) { |
|
Michael Starzinger
2017/01/30 12:42:11
nit: s/Size/instruction_size/ to avoid dispatched
Michael Starzinger
2017/01/30 12:54:48
Ooops, looked at the wrong use-site. Please disreg
mvstanton
2017/01/30 14:55:37
Per discussion, Size() is now the right predicate.
|
| + return OptimizationReason::kDoNotOptimize; |
| + } |
| + |
| if (ticks >= kProfilerTicksBeforeOptimization) { |
| int typeinfo, generic, total, type_percentage, generic_percentage; |
| GetICCounts(function, &typeinfo, &generic, &total, &type_percentage, |