perf pmu: Avoid passing format list to perf_pmu__config_terms()
authorIan Rogers <irogers@google.com>
Wed, 23 Aug 2023 08:08:08 +0000 (01:08 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 23 Aug 2023 11:49:35 +0000 (08:49 -0300)
commit804fee5d0f7f14d9328efc1edfed1dba39aba532
tree61c1896a3b315e05f09d407a662ab00c893bbe7f
parent6f2f6eafcd0d54e2c9bdbd4f89732df2a9b6fb76
perf pmu: Avoid passing format list to perf_pmu__config_terms()

Abstract the format list better, hiding it in the PMU, by changing
perf_pmu__config_terms() the PMU rather than the format list in the PMU.

Change the PMU test to pass a dummy PMU for this purpose. Changing the
test allows perf_pmu__del_formats() to become static.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Gaosheng Cui <cuigaosheng1@huawei.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jing Zhang <renyu.zj@linux.alibaba.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
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/20230823080828.1460376-6-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/x86/util/intel-pt.c
tools/perf/tests/pmu.c
tools/perf/util/pmu.c
tools/perf/util/pmu.h