perf tools: Use perf_cpu_map__nr instead of cpu_map__nr
Switch the rest of the perf code to use libperf's perf_cpu_map__nr(), which is the same as current cpu_map__nr() and remove the cpu_map__nr() function. Link: http://lkml.kernel.org/n/tip-6e0guy75clis7nm0xpuz9fga@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190822111141.25823-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
db9a5fd02a
commit
6549cd8f2c
@@ -653,7 +653,7 @@ static int cs_etm_info_fill(struct auxtrace_record *itr,
|
||||
cpu_map = online_cpus;
|
||||
} else {
|
||||
/* Make sure all specified CPUs are online */
|
||||
for (i = 0; i < cpu_map__nr(event_cpus); i++) {
|
||||
for (i = 0; i < perf_cpu_map__nr(event_cpus); i++) {
|
||||
if (cpu_map__has(event_cpus, i) &&
|
||||
!cpu_map__has(online_cpus, i))
|
||||
return -EINVAL;
|
||||
@@ -662,7 +662,7 @@ static int cs_etm_info_fill(struct auxtrace_record *itr,
|
||||
cpu_map = event_cpus;
|
||||
}
|
||||
|
||||
nr_cpu = cpu_map__nr(cpu_map);
|
||||
nr_cpu = perf_cpu_map__nr(cpu_map);
|
||||
/* Get PMU type as dynamically assigned by the core */
|
||||
type = cs_etm_pmu->type;
|
||||
|
||||
|
Reference in New Issue
Block a user