libperf: Add arm64 support to perf_mmap__read_self()
authorRob Herring <robh@kernel.org>
Tue, 1 Feb 2022 21:40:56 +0000 (15:40 -0600)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sun, 6 Feb 2022 12:14:27 +0000 (09:14 -0300)
commit407eb43ae87c969d98746c3274ae5d0f977b102e
tree09baeeeb549fd1d84320e0debcc03ecaea545383
parent4f2492731ada9d702ffdfaa6ec1ff64820a1664c
libperf: Add arm64 support to perf_mmap__read_self()

Add the arm64 variants for read_perf_counter() and read_timestamp().
Unfortunately the counter number is encoded into the instruction, so the
code is a bit verbose to enumerate all possible counters.

Tested-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Tested-by: John Garry <john.garry@huawei.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: https://lore.kernel.org/r/20220201214056.702854-1-robh@kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-perf-users@vger.kernel.org
tools/lib/perf/mmap.c
tools/lib/perf/tests/test-evsel.c