}
-static void GetICCounts(Code* shared_code, int* ic_with_type_info_count,
- int* ic_generic_count, int* ic_total_count,
- int* type_info_percentage, int* generic_percentage) {
+static void GetICCounts(SharedFunctionInfo* shared,
+ int* ic_with_type_info_count, int* ic_generic_count,
+ int* ic_total_count, int* type_info_percentage,
+ int* generic_percentage) {
+ Code* shared_code = shared->code();
*ic_total_count = 0;
*ic_generic_count = 0;
*ic_with_type_info_count = 0;
*ic_generic_count = info->ic_generic_count();
*ic_total_count = info->ic_total_count();
}
+
+ // Harvest vector-ics as well
+ TypeFeedbackVector* vector = shared->feedback_vector();
+ *ic_with_type_info_count += vector->ic_with_type_info_count();
+ *ic_generic_count += vector->ic_generic_count();
+
if (*ic_total_count > 0) {
*type_info_percentage = 100 * *ic_with_type_info_count / *ic_total_count;
*generic_percentage = 100 * *ic_generic_count / *ic_total_count;
PrintF(" for recompilation, reason: %s", reason);
if (FLAG_type_info_threshold > 0) {
int typeinfo, generic, total, type_percentage, generic_percentage;
- GetICCounts(function->shared()->code(), &typeinfo, &generic, &total,
+ GetICCounts(function->shared(), &typeinfo, &generic, &total,
&type_percentage, &generic_percentage);
PrintF(", ICs with typeinfo: %d/%d (%d%%)", typeinfo, total,
type_percentage);
if (ticks >= kProfilerTicksBeforeOptimization) {
int typeinfo, generic, total, type_percentage, generic_percentage;
- GetICCounts(shared_code, &typeinfo, &generic, &total, &type_percentage,
+ GetICCounts(shared, &typeinfo, &generic, &total, &type_percentage,
&generic_percentage);
if (type_percentage >= FLAG_type_info_threshold &&
generic_percentage <= FLAG_generic_ic_threshold) {
// If no IC was patched since the last tick and this function is very
// small, optimistically optimize it now.
int typeinfo, generic, total, type_percentage, generic_percentage;
- GetICCounts(shared_code, &typeinfo, &generic, &total, &type_percentage,
+ GetICCounts(shared, &typeinfo, &generic, &total, &type_percentage,
&generic_percentage);
if (type_percentage >= FLAG_type_info_threshold &&
generic_percentage <= FLAG_generic_ic_threshold) {