#include <linux/string.h>
#include <linux/time64.h>
#include <math.h>
+#include <perf/cpumap.h>
#include "color.h"
#include "counts.h"
#include "evlist.h"
evlist__for_each_entry(evlist, counter) {
print_counter_aggrdata(config, counter, s,
prefix, metric_only,
- &first, -1);
+ &first, /*cpu=*/-1);
}
if (metric_only)
fputc('\n', output);
FILE *output = config->output;
u64 ena, run, val;
double uval;
- int cpu;
+ int idx, cpu;
struct aggr_cpu_id id;
- for (cpu = 0; cpu < evsel__nr_cpus(counter); cpu++) {
- struct aggr_data ad = { .cpu_map_idx = cpu };
+ perf_cpu_map__for_each_cpu(cpu, idx, evsel__cpus(counter)) {
+ struct aggr_data ad = { .cpu_map_idx = idx };
if (!collect_data(config, counter, counter_cb, &ad))
return;
print_counter_aggrdata(config, counter, s,
prefix, metric_only,
- &first, -1);
+ &first, /*cpu=*/-1);
}
if (metric_only)