[profiler] Minor cleanup since we only harvest vector IC counts now

BUG=v8:6409

Change-Id: I9e06388c683e283a1922fb436dceb244f5093042
Reviewed-on: https://chromium-review.googlesource.com/664857
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47993}
This commit is contained in:
Ross McIlroy 2017-09-13 13:14:23 +01:00 committed by Commit Bot
parent 14b424c308
commit eb0950d2ec

View File

@ -73,18 +73,10 @@ RuntimeProfiler::RuntimeProfiler(Isolate* isolate)
static void GetICCounts(JSFunction* function, int* ic_with_type_info_count,
int* ic_generic_count, int* ic_total_count,
int* type_info_percentage, int* generic_percentage) {
*ic_total_count = 0;
*ic_generic_count = 0;
*ic_with_type_info_count = 0;
// Harvest vector-ics as well
// Harvest vector-ics.
FeedbackVector* vector = function->feedback_vector();
int with = 0, gen = 0, type_vector_ic_count = 0;
vector->ComputeCounts(&with, &gen, &type_vector_ic_count);
*ic_total_count += type_vector_ic_count;
*ic_with_type_info_count += with;
*ic_generic_count += gen;
vector->ComputeCounts(ic_with_type_info_count, ic_generic_count,
ic_total_count);
if (*ic_total_count > 0) {
*type_info_percentage = 100 * *ic_with_type_info_count / *ic_total_count;