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 <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: colin ian king <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Shunsuke Nakamura <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 46f57d2 commit 99fc11b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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)