[PATCH v1 00/14] Clean up libperf cpumap's empty function

Arnaldo Carvalho de Melo acme at kernel.org
Tue Dec 12 09:59:37 PST 2023


Em Tue, Nov 28, 2023 at 10:01:57PM -0800, Ian Rogers escreveu:
> Rename and clean up the use of libperf CPU map functions particularly
> focussing on perf_cpu_map__empty that may return true for maps
> containing CPUs but also with an "any CPU"/dummy value.
> 
> perf_cpu_map__nr is also troubling in that iterating an empty CPU map
> will yield the "any CPU"/dummy value. Reduce the appearance of some
> calls to this by using the perf_cpu_map__for_each_cpu macro.
> 
> Ian Rogers (14):
>   libperf cpumap: Rename perf_cpu_map__dummy_new
>   libperf cpumap: Rename and prefer sysfs for perf_cpu_map__default_new
>   libperf cpumap: Rename perf_cpu_map__empty
>   libperf cpumap: Replace usage of perf_cpu_map__new(NULL)
>   libperf cpumap: Add for_each_cpu that skips the "any CPU" case

Applied 1-6, with James Reviewed-by tags, would be good to have Adrian
check the PT and BTS parts, testing the end result if he things its all
ok.

- Arnaldo



More information about the linux-arm-kernel mailing list