Thread (84 messages) 84 messages, 6 authors, 2022-01-12

Re: [PATCH v4 04/48] perf stat: Switch aggregation to use for_each loop

From: Ian Rogers <irogers@google.com>
Date: 2022-01-10 22:22:50
Also in: linux-perf-users, lkml

On Mon, Jan 10, 2022 at 10:51 AM John Garry [off-list ref] wrote:
On 05/01/2022 06:13, Ian Rogers wrote:
quoted
+     cpus = evsel__cpus(evsel);
+     perf_cpu_map__for_each_cpu(cpu, idx, cpus) {
It seems a common pattern to evaluate cpus and use in
perf_cpu_map__for_each_cpu() - is it possible to make a macro to accept
evsel and create cpus, like perf_evsel__for_each_cpu()?
It's possible, I'm not sure it is saving much and it is common to also
want to iterate the cpumap of the evlist.

Thanks,
Ian
quoted
+             if (cpu_map__compare_aggr_cpu_id(config->aggr_get_id(config, cpus, idx),
+                                              id))
+                     return cpu;
      }
      return 0;
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help