* [PATCH] libperf test: Fix build error
@ 2021-10-06 9:57 Shunsuke Nakamura
2021-10-08 13:09 ` Jiri Olsa
0 siblings, 1 reply; 3+ messages in thread
From: Shunsuke Nakamura @ 2021-10-06 9:57 UTC (permalink / raw)
To: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
namhyung
Cc: linux-kernel, linux-perf-users
In test_stat_user_read, following build error occurs except i386 and
x86_64 architectures:
tests/test-evsel.c:129:31: error: variable 'pc' set but not used [-Werror=unused-but-set-variable]
struct perf_event_mmap_page *pc;
Fix build error.
Signed-off-by: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
---
tools/lib/perf/tests/test-evsel.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/lib/perf/tests/test-evsel.c b/tools/lib/perf/tests/test-evsel.c
index a184e4861627..9abd4c0bf6db 100644
--- a/tools/lib/perf/tests/test-evsel.c
+++ b/tools/lib/perf/tests/test-evsel.c
@@ -148,6 +148,7 @@ static int test_stat_user_read(int event)
__T("failed to mmap evsel", err == 0);
pc = perf_evsel__mmap_base(evsel, 0, 0);
+ __T("failed to get mmapped address", pc);
#if defined(__i386__) || defined(__x86_64__)
__T("userspace counter access not supported", pc->cap_user_rdpmc);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] libperf test: Fix build error
2021-10-06 9:57 [PATCH] libperf test: Fix build error Shunsuke Nakamura
@ 2021-10-08 13:09 ` Jiri Olsa
2021-10-08 18:51 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 3+ messages in thread
From: Jiri Olsa @ 2021-10-08 13:09 UTC (permalink / raw)
To: Shunsuke Nakamura
Cc: peterz, mingo, acme, mark.rutland, alexander.shishkin, namhyung,
linux-kernel, linux-perf-users
On Wed, Oct 06, 2021 at 06:57:03PM +0900, Shunsuke Nakamura wrote:
> In test_stat_user_read, following build error occurs except i386 and
> x86_64 architectures:
>
> tests/test-evsel.c:129:31: error: variable 'pc' set but not used [-Werror=unused-but-set-variable]
> struct perf_event_mmap_page *pc;
>
> Fix build error.
>
> Signed-off-by: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
thanks,
jirka
> ---
> tools/lib/perf/tests/test-evsel.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/lib/perf/tests/test-evsel.c b/tools/lib/perf/tests/test-evsel.c
> index a184e4861627..9abd4c0bf6db 100644
> --- a/tools/lib/perf/tests/test-evsel.c
> +++ b/tools/lib/perf/tests/test-evsel.c
> @@ -148,6 +148,7 @@ static int test_stat_user_read(int event)
> __T("failed to mmap evsel", err == 0);
>
> pc = perf_evsel__mmap_base(evsel, 0, 0);
> + __T("failed to get mmapped address", pc);
>
> #if defined(__i386__) || defined(__x86_64__)
> __T("userspace counter access not supported", pc->cap_user_rdpmc);
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] libperf test: Fix build error
2021-10-08 13:09 ` Jiri Olsa
@ 2021-10-08 18:51 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-10-08 18:51 UTC (permalink / raw)
To: Jiri Olsa
Cc: Shunsuke Nakamura, peterz, mingo, mark.rutland,
alexander.shishkin, namhyung, linux-kernel, linux-perf-users
Em Fri, Oct 08, 2021 at 03:09:03PM +0200, Jiri Olsa escreveu:
> On Wed, Oct 06, 2021 at 06:57:03PM +0900, Shunsuke Nakamura wrote:
> > In test_stat_user_read, following build error occurs except i386 and
> > x86_64 architectures:
> >
> > tests/test-evsel.c:129:31: error: variable 'pc' set but not used [-Werror=unused-but-set-variable]
> > struct perf_event_mmap_page *pc;
> >
> > Fix build error.
> >
> > Signed-off-by: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
>
> Acked-by: Jiri Olsa <jolsa@redhat.com>
Thanks, applied.
- Arnaldo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-08 18:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-06 9:57 [PATCH] libperf test: Fix build error Shunsuke Nakamura
2021-10-08 13:09 ` Jiri Olsa
2021-10-08 18:51 ` 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