Skip to content

Commit 99fc11b

Browse files
captain5050acmel
authored andcommitted
libperf tests: Update a use of the new cpumap API
Fixes a build breakage. Fixes: 6d18804 ("perf cpumap: Give CPUs their own type") Signed-off-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: colin ian king <colin.king@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com> Link: http://lore.kernel.org/lkml/20220114065105.1806542-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 46f57d2 commit 99fc11b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tools/lib/perf/tests/test-evlist.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ static int test_mmap_cpus(void)
334334
};
335335
cpu_set_t saved_mask;
336336
char path[PATH_MAX];
337-
int id, err, cpu, tmp;
337+
int id, err, tmp;
338+
struct perf_cpu cpu;
338339
union perf_event *event;
339340
int count = 0;
340341

@@ -377,7 +378,7 @@ static int test_mmap_cpus(void)
377378
cpu_set_t mask;
378379

379380
CPU_ZERO(&mask);
380-
CPU_SET(cpu, &mask);
381+
CPU_SET(cpu.cpu, &mask);
381382

382383
err = sched_setaffinity(0, sizeof(mask), &mask);
383384
__T("sched_setaffinity failed", err == 0);

0 commit comments

Comments
 (0)