Lines Matching refs:metrics
1802 } metrics[] = { variable
1887 metric_cnt = sizeof(metrics) / sizeof(struct profile_metric); in profile_parse_metrics()
1891 if (is_prefix(argv[0], metrics[i].name)) { in profile_parse_metrics()
1892 if (!metrics[i].selected) in profile_parse_metrics()
1894 metrics[i].selected = true; in profile_parse_metrics()
1937 for (m = 0; m < ARRAY_SIZE(metrics); m++) { in profile_read_values()
1940 if (!metrics[m].selected) in profile_read_values()
1950 metrics[m].val.counter += values[cpu].counter; in profile_read_values()
1951 metrics[m].val.enabled += values[cpu].enabled; in profile_read_values()
1952 metrics[m].val.running += values[cpu].running; in profile_read_values()
1963 for (m = 0; m < ARRAY_SIZE(metrics); m++) { in profile_print_readings_json()
1964 if (!metrics[m].selected) in profile_print_readings_json()
1967 jsonw_string_field(json_wtr, "metric", metrics[m].name); in profile_print_readings_json()
1969 jsonw_lluint_field(json_wtr, "value", metrics[m].val.counter); in profile_print_readings_json()
1970 jsonw_lluint_field(json_wtr, "enabled", metrics[m].val.enabled); in profile_print_readings_json()
1971 jsonw_lluint_field(json_wtr, "running", metrics[m].val.running); in profile_print_readings_json()
1983 for (m = 0; m < ARRAY_SIZE(metrics); m++) { in profile_print_readings_plain()
1984 struct bpf_perf_event_value *val = &metrics[m].val; in profile_print_readings_plain()
1987 if (!metrics[m].selected) in profile_print_readings_plain()
1989 printf("%18llu %-20s", val->counter, metrics[m].name); in profile_print_readings_plain()
1991 r = metrics[m].ratio_metric - 1; in profile_print_readings_plain()
1992 if (r >= 0 && metrics[r].selected && in profile_print_readings_plain()
1993 metrics[r].val.counter > 0) { in profile_print_readings_plain()
1995 val->counter * metrics[m].ratio_mul / in profile_print_readings_plain()
1996 metrics[r].val.counter, in profile_print_readings_plain()
1997 metrics[m].ratio_desc); in profile_print_readings_plain()
2092 for (m = 0; m < ARRAY_SIZE(metrics); m++) { in profile_open_perf_events()
2093 if (!metrics[m].selected) in profile_open_perf_events()
2096 pmu_fd = syscall(__NR_perf_event_open, &metrics[m].attr, in profile_open_perf_events()
2103 metrics[m].name, cpu); in profile_open_perf_events()