Chromium Code Reviews| Index: src/runtime-profiler.cc |
| diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc |
| index 04aa02edb3c8d8723a992ccf82e9eb5422bc146b..7e0f0be2154a1bc011518fb0f92b5333a1ad1e46 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 |
| @@ -375,7 +366,7 @@ void RuntimeProfiler::SetUp() { |
| void RuntimeProfiler::Reset() { |
| if (FLAG_watch_ic_patching) { |
|
ulan
2012/03/27 11:51:13
I would prefer
if (!FLAG_watch_ic_patching) {
...
Jakob Kummerow
2012/03/27 12:27:47
Done.
|
| - total_code_generated_ = 0; |
| + // Nothing to do here. |
| } else { // !FLAG_watch_ic_patching |
| sampler_threshold_ = kSamplerThresholdInit; |
| sampler_threshold_size_factor_ = kSamplerThresholdSizeFactorInit; |