| 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/base/platform/platform.h" | 8 #include "src/base/platform/platform.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 TypeFeedbackInfo* info = TypeFeedbackInfo::cast(raw_info); | 74 TypeFeedbackInfo* info = TypeFeedbackInfo::cast(raw_info); |
| 75 *ic_with_type_info_count = info->ic_with_type_info_count(); | 75 *ic_with_type_info_count = info->ic_with_type_info_count(); |
| 76 *ic_generic_count = info->ic_generic_count(); | 76 *ic_generic_count = info->ic_generic_count(); |
| 77 *ic_total_count = info->ic_total_count(); | 77 *ic_total_count = info->ic_total_count(); |
| 78 } | 78 } |
| 79 } | 79 } |
| 80 | 80 |
| 81 // Harvest vector-ics as well | 81 // Harvest vector-ics as well |
| 82 TypeFeedbackVector* vector = function->feedback_vector(); | 82 TypeFeedbackVector* vector = function->feedback_vector(); |
| 83 int with = 0, gen = 0; | 83 int with = 0, gen = 0; |
| 84 vector->ComputeCounts(&with, &gen); | 84 const bool is_interpreted = |
| 85 function->shared()->code()->is_interpreter_trampoline_builtin(); |
| 86 |
| 87 vector->ComputeCounts(&with, &gen, is_interpreted); |
| 85 *ic_with_type_info_count += with; | 88 *ic_with_type_info_count += with; |
| 86 *ic_generic_count += gen; | 89 *ic_generic_count += gen; |
| 87 | 90 |
| 88 if (*ic_total_count > 0) { | 91 if (*ic_total_count > 0) { |
| 89 *type_info_percentage = 100 * *ic_with_type_info_count / *ic_total_count; | 92 *type_info_percentage = 100 * *ic_with_type_info_count / *ic_total_count; |
| 90 *generic_percentage = 100 * *ic_generic_count / *ic_total_count; | 93 *generic_percentage = 100 * *ic_generic_count / *ic_total_count; |
| 91 } else { | 94 } else { |
| 92 *type_info_percentage = 100; // Compared against lower bound. | 95 *type_info_percentage = 100; // Compared against lower bound. |
| 93 *generic_percentage = 0; // Compared against upper bound. | 96 *generic_percentage = 0; // Compared against upper bound. |
| 94 } | 97 } |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 DCHECK_EQ(next_tier, Compiler::OPTIMIZED); | 419 DCHECK_EQ(next_tier, Compiler::OPTIMIZED); |
| 417 MaybeOptimizeFullCodegen(function, frame, frame_count); | 420 MaybeOptimizeFullCodegen(function, frame, frame_count); |
| 418 } | 421 } |
| 419 } | 422 } |
| 420 any_ic_changed_ = false; | 423 any_ic_changed_ = false; |
| 421 } | 424 } |
| 422 | 425 |
| 423 | 426 |
| 424 } // namespace internal | 427 } // namespace internal |
| 425 } // namespace v8 | 428 } // namespace v8 |
| OLD | NEW |