| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/runtime-profiler.h" | 7 #include "src/runtime-profiler.h" |
| 8 | 8 |
| 9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
| 10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 int typeinfo, generic, total, type_percentage, generic_percentage; | 99 int typeinfo, generic, total, type_percentage, generic_percentage; |
| 100 GetICCounts(function->shared(), &typeinfo, &generic, &total, | 100 GetICCounts(function->shared(), &typeinfo, &generic, &total, |
| 101 &type_percentage, &generic_percentage); | 101 &type_percentage, &generic_percentage); |
| 102 PrintF(", ICs with typeinfo: %d/%d (%d%%)", typeinfo, total, | 102 PrintF(", ICs with typeinfo: %d/%d (%d%%)", typeinfo, total, |
| 103 type_percentage); | 103 type_percentage); |
| 104 PrintF(", generic ICs: %d/%d (%d%%)", generic, total, generic_percentage); | 104 PrintF(", generic ICs: %d/%d (%d%%)", generic, total, generic_percentage); |
| 105 } | 105 } |
| 106 PrintF("]\n"); | 106 PrintF("]\n"); |
| 107 } | 107 } |
| 108 | 108 |
| 109 function->shared()->set_optimize_next_closure(true); | |
| 110 function->AttemptConcurrentOptimization(); | 109 function->AttemptConcurrentOptimization(); |
| 111 } | 110 } |
| 112 | 111 |
| 113 | 112 |
| 114 void RuntimeProfiler::AttemptOnStackReplacement(JSFunction* function, | 113 void RuntimeProfiler::AttemptOnStackReplacement(JSFunction* function, |
| 115 int loop_nesting_levels) { | 114 int loop_nesting_levels) { |
| 116 SharedFunctionInfo* shared = function->shared(); | 115 SharedFunctionInfo* shared = function->shared(); |
| 117 // See AlwaysFullCompiler (in compiler.cc) comment on why we need | 116 // See AlwaysFullCompiler (in compiler.cc) comment on why we need |
| 118 // Debug::has_break_points(). | 117 // Debug::has_break_points(). |
| 119 if (!FLAG_use_osr || | 118 if (!FLAG_use_osr || |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 } | 261 } |
| 263 } else { | 262 } else { |
| 264 shared_code->set_profiler_ticks(ticks + 1); | 263 shared_code->set_profiler_ticks(ticks + 1); |
| 265 } | 264 } |
| 266 } | 265 } |
| 267 any_ic_changed_ = false; | 266 any_ic_changed_ = false; |
| 268 } | 267 } |
| 269 | 268 |
| 270 | 269 |
| 271 } } // namespace v8::internal | 270 } } // namespace v8::internal |
| OLD | NEW |