perf vendor events amd: Restrict model detection for zen1 based processors
authorVijay Thakkar <vijaythakkar@me.com>
Wed, 18 Mar 2020 19:00:00 +0000 (15:00 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 24 Mar 2020 13:35:53 +0000 (10:35 -0300)
commitc5f18e9e94bad244115dc5e47f27bd061ecc5552
tree89833cdb427b76b12db2afd602273de42ec45159
parent58fc90fda0cc983c11c5290c7a9e992b08ac4a5c
perf vendor events amd: Restrict model detection for zen1 based processors

This patch changes the previous blanket detection of AMD Family 17h
processors to be more specific to Zen1 core based products only by
replacing model detection regex pattern [[:xdigit:]]+ with
([12][0-9A-F]|[0-9A-F]), restricting to models 0 though 2f only.

This change is required to allow for the addition of separate PMU events
for Zen2 core based models in the following patches as those belong to
family 17h but have different PMCs. Current PMU events directory has
also been renamed to "amdzen1" from "amdfam17h" to reflect this
specificity.

Note that although this change does not break PMU counters for existing
zen1 based systems, it does disable the current set of counters for zen2
based systems. Counters for zen2 have been added in the following
patches in this patchset.

Signed-off-by: Vijay Thakkar <vijaythakkar@me.com>
Acked-by: Kim Phillips <kim.phillips@amd.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Jon Grimm <jon.grimm@amd.com>
Cc: Martin Liška <mliska@suse.cz>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20200318190002.307290-2-vijaythakkar@me.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/pmu-events/arch/x86/amdzen1/branch.json [moved from tools/perf/pmu-events/arch/x86/amdfam17h/branch.json with 100% similarity]
tools/perf/pmu-events/arch/x86/amdzen1/cache.json [moved from tools/perf/pmu-events/arch/x86/amdfam17h/cache.json with 100% similarity]
tools/perf/pmu-events/arch/x86/amdzen1/core.json [moved from tools/perf/pmu-events/arch/x86/amdfam17h/core.json with 100% similarity]
tools/perf/pmu-events/arch/x86/amdzen1/floating-point.json [moved from tools/perf/pmu-events/arch/x86/amdfam17h/floating-point.json with 100% similarity]
tools/perf/pmu-events/arch/x86/amdzen1/memory.json [moved from tools/perf/pmu-events/arch/x86/amdfam17h/memory.json with 100% similarity]
tools/perf/pmu-events/arch/x86/amdzen1/other.json [moved from tools/perf/pmu-events/arch/x86/amdfam17h/other.json with 100% similarity]
tools/perf/pmu-events/arch/x86/mapfile.csv