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/runtime-profiler.h" | 5 #include "src/runtime-profiler.h" |
6 | 6 |
7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
8 #include "src/ast/scopeinfo.h" | 8 #include "src/ast/scopeinfo.h" |
9 #include "src/base/platform/platform.h" | 9 #include "src/base/platform/platform.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
11 #include "src/code-stubs.h" | 11 #include "src/code-stubs.h" |
12 #include "src/compilation-cache.h" | 12 #include "src/compilation-cache.h" |
13 #include "src/execution.h" | 13 #include "src/execution.h" |
14 #include "src/frames-inl.h" | 14 #include "src/frames-inl.h" |
15 #include "src/full-codegen/full-codegen.h" | 15 #include "src/full-codegen/full-codegen.h" |
16 #include "src/global-handles.h" | 16 #include "src/global-handles.h" |
17 | 17 |
18 namespace v8 { | 18 namespace v8 { |
19 namespace internal { | 19 namespace internal { |
20 | 20 |
21 | 21 |
22 // Number of times a function has to be seen on the stack before it is | 22 // Number of times a function has to be seen on the stack before it is |
23 // compiled for baseline. | 23 // compiled for baseline. |
24 static const int kProfilerTicksBeforeBaseline = 2; | 24 static const int kProfilerTicksBeforeBaseline = 1; |
25 // Number of times a function has to be seen on the stack before it is | 25 // Number of times a function has to be seen on the stack before it is |
26 // optimized. | 26 // optimized. |
27 static const int kProfilerTicksBeforeOptimization = 2; | 27 static const int kProfilerTicksBeforeOptimization = 2; |
28 // If the function optimization was disabled due to high deoptimization count, | 28 // If the function optimization was disabled due to high deoptimization count, |
29 // but the function is hot and has been seen on the stack this number of times, | 29 // but the function is hot and has been seen on the stack this number of times, |
30 // then we try to reenable optimization for this function. | 30 // then we try to reenable optimization for this function. |
31 static const int kProfilerTicksBeforeReenablingOptimization = 250; | 31 static const int kProfilerTicksBeforeReenablingOptimization = 250; |
32 // If a function does not have enough type info (according to | 32 // If a function does not have enough type info (according to |
33 // FLAG_type_info_threshold), but has seen a huge number of ticks, | 33 // FLAG_type_info_threshold), but has seen a huge number of ticks, |
34 // optimize it as it is. | 34 // optimize it as it is. |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 } else { | 317 } else { |
318 MaybeOptimizeFullCodegen(function, frame_count, frame->is_optimized()); | 318 MaybeOptimizeFullCodegen(function, frame_count, frame->is_optimized()); |
319 } | 319 } |
320 } | 320 } |
321 any_ic_changed_ = false; | 321 any_ic_changed_ = false; |
322 } | 322 } |
323 | 323 |
324 | 324 |
325 } // namespace internal | 325 } // namespace internal |
326 } // namespace v8 | 326 } // namespace v8 |
OLD | NEW |