diff options
author | Ian Rogers <irogers@google.com> | 2023-08-23 11:08:08 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-08-23 14:49:35 +0300 |
commit | 804fee5d0f7f14d9328efc1edfed1dba39aba532 (patch) | |
tree | 61c1896a3b315e05f09d407a662ab00c893bbe7f /tools/perf/util/pmu.h | |
parent | 6f2f6eafcd0d54e2c9bdbd4f89732df2a9b6fb76 (diff) | |
download | linux-804fee5d0f7f14d9328efc1edfed1dba39aba532.tar.xz |
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>
Diffstat (limited to 'tools/perf/util/pmu.h')
-rw-r--r-- | tools/perf/util/pmu.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h index 5394c85d20b9..eb26c8bc079f 100644 --- a/tools/perf/util/pmu.h +++ b/tools/perf/util/pmu.h @@ -217,7 +217,7 @@ void pmu_add_sys_aliases(struct list_head *head, struct perf_pmu *pmu); int perf_pmu__config(struct perf_pmu *pmu, struct perf_event_attr *attr, struct list_head *head_terms, struct parse_events_error *error); -int perf_pmu__config_terms(const char *pmu_name, struct list_head *formats, +int perf_pmu__config_terms(struct perf_pmu *pmu, struct perf_event_attr *attr, struct list_head *head_terms, bool zero, struct parse_events_error *error); @@ -231,7 +231,6 @@ struct list_head *perf_pmu__alias(struct perf_pmu *pmu, int perf_pmu__new_format(struct list_head *list, char *name, int config, unsigned long *bits); int perf_pmu__format_parse(int dirfd, struct list_head *head); -void perf_pmu__del_formats(struct list_head *formats); bool perf_pmu__has_format(const struct perf_pmu *pmu, const char *name); bool is_pmu_core(const char *name); |