perf pmus: Create placholder regardless of scanning core_only
authorIan Rogers <irogers@google.com>
Thu, 6 Jul 2023 18:37:04 +0000 (11:37 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 1 Aug 2023 03:30:06 +0000 (00:30 -0300)
commit34bc65d6d831200194c0b9a30fb8fe47faaf83d6
tree3b0eb673de81a7384c46622905b4e6babf768374
parent98ce8e4a9dcfb448b30a2d7a16190f4a00382377
perf pmus: Create placholder regardless of scanning core_only

If scanning all PMUs the placeholder is still necessary if no core PMU
is found. This situation occurs in perf test's parse-events test,
when uncore events appear before core.

Fixes: 628eaa4e877af823 ("perf pmus: Add placeholder core PMU")
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Thomas Richter <tmricht@linux.ibm.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230706183705.601412-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/pmus.c