perf pmu: Add pmu_events_map__find() function to find the common PMU map for the...
authorJohn Garry <john.garry@huawei.com>
Wed, 7 Apr 2021 10:32:47 +0000 (18:32 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 8 Apr 2021 17:24:14 +0000 (14:24 -0300)
commite126bef55f1dfb44440d632f9aae66af3240a435
tree3cee6e651a6ed200bc4193d7ad0e45a508c7f386
parenta48a995edcde832f2d4c4ec1bfb73e0da93810fb
perf pmu: Add pmu_events_map__find() function to find the common PMU map for the system

Add a function to find the common PMU map for the system.

For arm64, a special variant is added. This is because arm64 supports
heterogeneous CPU systems. As such, it cannot be guaranteed that the
cpumap is same for all CPUs. So in case of heterogeneous systems, don't
return a cpumap.

Reviewed-by: Kajol Jain <kjain@linux.ibm.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Tested-by: Paul A. Clarke <pc@us.ibm.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linuxarm@huawei.com
Link: https://lore.kernel.org/r/1617791570-165223-4-git-send-email-john.garry@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/arm64/util/Build
tools/perf/arch/arm64/util/pmu.c [new file with mode: 0644]
tools/perf/tests/pmu-events.c
tools/perf/util/metricgroup.c
tools/perf/util/pmu.c
tools/perf/util/pmu.h
tools/perf/util/s390-sample-raw.c