Commit f304c8d9 authored by Shunsuke Nakamura's avatar Shunsuke Nakamura Committed by Arnaldo Carvalho de Melo
Browse files

libperf test evsel: Fix build error on !x86 architectures

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: default avatarShunsuke Nakamura <>
Acked-by: default avatarJiri Olsa <>
Cc: Alexander Shishkin <>
Cc: Ingo Molnar <>
Cc: Mark Rutland <>
Cc: Namhyung Kim <>
Cc: Peter Zijlstra <>

Signed-off-by: default avatarArnaldo Carvalho de Melo <>
parent 8e820f96
......@@ -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);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment