Index: src/runtime-profiler.cc |
diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc |
index 5784e4d5aaad5f682317ce8e20cb9dbc4a684a22..0c9b9e2872b5a4d123c4a874fedc8b7e9506c30f 100644 |
--- a/src/runtime-profiler.cc |
+++ b/src/runtime-profiler.cc |
@@ -185,6 +185,16 @@ void RuntimeProfiler::OptimizeNow() { |
SharedFunctionInfo* shared = function->shared(); |
Code* shared_code = shared->code(); |
+ List<JSFunction*> functions(4); |
+ frame->GetFunctions(&functions); |
+ for (int i = functions.length(); --i >= 0; ) { |
+ SharedFunctionInfo* shared_function_info = functions[i]->shared(); |
+ int ticks = shared_function_info->profiler_ticks(); |
+ if (ticks < Smi::kMaxValue) { |
+ shared_function_info->set_profiler_ticks(ticks + 1); |
+ } |
+ } |
+ |
if (shared_code->kind() != Code::FUNCTION) continue; |
if (function->IsInOptimizationQueue()) continue; |