* [PATCH] libperf tests: Update a use of the new cpumap api.
@ 2022-01-14 6:51 Ian Rogers
2022-01-14 14:34 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 2+ messages in thread
From: Ian Rogers @ 2022-01-14 6:51 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
Shunsuke Nakamura, Colin Ian King, linux-perf-users,
linux-kernel
Cc: Ian Rogers
Fixes a build breakage.
Fixes: 6d18804b963b ("perf cpumap: Give CPUs their own type")
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/lib/perf/tests/test-evlist.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/lib/perf/tests/test-evlist.c b/tools/lib/perf/tests/test-evlist.c
index e7afff12c35a..b3479dfa9a1c 100644
--- a/tools/lib/perf/tests/test-evlist.c
+++ b/tools/lib/perf/tests/test-evlist.c
@@ -334,7 +334,8 @@ static int test_mmap_cpus(void)
};
cpu_set_t saved_mask;
char path[PATH_MAX];
- int id, err, cpu, tmp;
+ int id, err, tmp;
+ struct perf_cpu cpu;
union perf_event *event;
int count = 0;
@@ -377,7 +378,7 @@ static int test_mmap_cpus(void)
cpu_set_t mask;
CPU_ZERO(&mask);
- CPU_SET(cpu, &mask);
+ CPU_SET(cpu.cpu, &mask);
err = sched_setaffinity(0, sizeof(mask), &mask);
__T("sched_setaffinity failed", err == 0);
--
2.34.1.703.g22d0c6ccf7-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libperf tests: Update a use of the new cpumap api.
2022-01-14 6:51 [PATCH] libperf tests: Update a use of the new cpumap api Ian Rogers
@ 2022-01-14 14:34 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-01-14 14:34 UTC (permalink / raw)
To: Ian Rogers
Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
Jiri Olsa, Namhyung Kim, Shunsuke Nakamura, Colin Ian King,
linux-perf-users, linux-kernel
Em Thu, Jan 13, 2022 at 10:51:05PM -0800, Ian Rogers escreveu:
> Fixes a build breakage.
>
> Fixes: 6d18804b963b ("perf cpumap: Give CPUs their own type")
I wonder how I didn't catch this in my tests...
Thanks, applied.
- Arnaldo
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> tools/lib/perf/tests/test-evlist.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tools/lib/perf/tests/test-evlist.c b/tools/lib/perf/tests/test-evlist.c
> index e7afff12c35a..b3479dfa9a1c 100644
> --- a/tools/lib/perf/tests/test-evlist.c
> +++ b/tools/lib/perf/tests/test-evlist.c
> @@ -334,7 +334,8 @@ static int test_mmap_cpus(void)
> };
> cpu_set_t saved_mask;
> char path[PATH_MAX];
> - int id, err, cpu, tmp;
> + int id, err, tmp;
> + struct perf_cpu cpu;
> union perf_event *event;
> int count = 0;
>
> @@ -377,7 +378,7 @@ static int test_mmap_cpus(void)
> cpu_set_t mask;
>
> CPU_ZERO(&mask);
> - CPU_SET(cpu, &mask);
> + CPU_SET(cpu.cpu, &mask);
>
> err = sched_setaffinity(0, sizeof(mask), &mask);
> __T("sched_setaffinity failed", err == 0);
> --
> 2.34.1.703.g22d0c6ccf7-goog
--
- Arnaldo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-14 14:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14 6:51 [PATCH] libperf tests: Update a use of the new cpumap api Ian Rogers
2022-01-14 14:34 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).