Lines Matching refs:metrics

1985 } metrics[] = {  variable
2070 metric_cnt = ARRAY_SIZE(metrics); in profile_parse_metrics()
2074 if (is_prefix(argv[0], metrics[i].name)) { in profile_parse_metrics()
2075 if (!metrics[i].selected) in profile_parse_metrics()
2077 metrics[i].selected = true; in profile_parse_metrics()
2120 for (m = 0; m < ARRAY_SIZE(metrics); m++) { in profile_read_values()
2123 if (!metrics[m].selected) in profile_read_values()
2133 metrics[m].val.counter += values[cpu].counter; in profile_read_values()
2134 metrics[m].val.enabled += values[cpu].enabled; in profile_read_values()
2135 metrics[m].val.running += values[cpu].running; in profile_read_values()
2146 for (m = 0; m < ARRAY_SIZE(metrics); m++) { in profile_print_readings_json()
2147 if (!metrics[m].selected) in profile_print_readings_json()
2150 jsonw_string_field(json_wtr, "metric", metrics[m].name); in profile_print_readings_json()
2152 jsonw_lluint_field(json_wtr, "value", metrics[m].val.counter); in profile_print_readings_json()
2153 jsonw_lluint_field(json_wtr, "enabled", metrics[m].val.enabled); in profile_print_readings_json()
2154 jsonw_lluint_field(json_wtr, "running", metrics[m].val.running); in profile_print_readings_json()
2166 for (m = 0; m < ARRAY_SIZE(metrics); m++) { in profile_print_readings_plain()
2167 struct bpf_perf_event_value *val = &metrics[m].val; in profile_print_readings_plain()
2170 if (!metrics[m].selected) in profile_print_readings_plain()
2172 printf("%18llu %-20s", val->counter, metrics[m].name); in profile_print_readings_plain()
2174 r = metrics[m].ratio_metric - 1; in profile_print_readings_plain()
2175 if (r >= 0 && metrics[r].selected && in profile_print_readings_plain()
2176 metrics[r].val.counter > 0) { in profile_print_readings_plain()
2178 val->counter * metrics[m].ratio_mul / in profile_print_readings_plain()
2179 metrics[r].val.counter, in profile_print_readings_plain()
2180 metrics[m].ratio_desc); in profile_print_readings_plain()
2278 pmu_fd = syscall(__NR_perf_event_open, &metrics[mid].attr, in profile_open_perf_event()
2283 cpu, metrics[mid].name); in profile_open_perf_event()
2320 for (m = 0; m < ARRAY_SIZE(metrics); m++) { in profile_open_perf_events()
2321 if (!metrics[m].selected) in profile_open_perf_events()
2326 metrics[m].name, cpu); in profile_open_perf_events()