| Index: src/runtime-profiler.cc
 | 
| diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc
 | 
| index 04aa02edb3c8d8723a992ccf82e9eb5422bc146b..2a3a2937e0151b2d9f8d2b5988d3825c213dff6a 100644
 | 
| --- a/src/runtime-profiler.cc
 | 
| +++ b/src/runtime-profiler.cc
 | 
| @@ -312,14 +312,6 @@ void RuntimeProfiler::OptimizeNow() {
 | 
|          // If no IC was patched since the last tick and this function is very
 | 
|          // small, optimistically optimize it now.
 | 
|          Optimize(function, "small function");
 | 
| -      } else if (!code_generated_ &&
 | 
| -          !any_ic_changed_ &&
 | 
| -          total_code_generated_ > 0 &&
 | 
| -          total_code_generated_ < 2000) {
 | 
| -        // If no code was generated and no IC was patched since the last tick,
 | 
| -        // but a little code has already been generated since last Reset(),
 | 
| -        // then type info might already be stable and we can optimize now.
 | 
| -        Optimize(function, "stable on startup");
 | 
|        } else {
 | 
|          function->shared()->set_profiler_ticks(ticks + 1);
 | 
|        }
 | 
| @@ -340,7 +332,6 @@ void RuntimeProfiler::OptimizeNow() {
 | 
|    }
 | 
|    if (FLAG_watch_ic_patching) {
 | 
|      any_ic_changed_ = false;
 | 
| -    code_generated_ = false;
 | 
|    } else {  // !FLAG_watch_ic_patching
 | 
|      // Add the collected functions as samples. It's important not to do
 | 
|      // this as part of collecting them because this will interfere with
 | 
| @@ -374,9 +365,7 @@ void RuntimeProfiler::SetUp() {
 | 
|  
 | 
|  
 | 
|  void RuntimeProfiler::Reset() {
 | 
| -  if (FLAG_watch_ic_patching) {
 | 
| -    total_code_generated_ = 0;
 | 
| -  } else {  // !FLAG_watch_ic_patching
 | 
| +  if (!FLAG_watch_ic_patching) {
 | 
|      sampler_threshold_ = kSamplerThresholdInit;
 | 
|      sampler_threshold_size_factor_ = kSamplerThresholdSizeFactorInit;
 | 
|      sampler_ticks_until_threshold_adjustment_ =
 | 
| 
 |