diff options
| author | Ian Rogers <irogers@google.com> | 2023-08-23 01:08:11 -0700 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-08-23 14:27:58 -0300 |
| commit | 838a8c5f40dd272f0b684cde6bf681c5a4d33c0d (patch) | |
| tree | 5c8625bd62ad48b6f5c45b0911e7f4319a5cd995 /tools/perf/util/pmu.h | |
| parent | perf pmu: Avoid passing format list to perf_pmu__format_bits() (diff) | |
| download | linux-838a8c5f40dd272f0b684cde6bf681c5a4d33c0d.tar.gz linux-838a8c5f40dd272f0b684cde6bf681c5a4d33c0d.zip | |
perf pmu: Pass PMU rather than aliases and format
Pass the pmu so the aliases and format list can be better abstracted
and later lazily loaded.
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-9-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 | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h index 1249fca02ffd..c4268053c979 100644 --- a/tools/perf/util/pmu.h +++ b/tools/perf/util/pmu.h @@ -213,7 +213,7 @@ struct perf_pmu_alias { char *pmu_name; }; -void pmu_add_sys_aliases(struct list_head *head, struct perf_pmu *pmu); +void pmu_add_sys_aliases(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); @@ -225,12 +225,11 @@ __u64 perf_pmu__format_bits(struct perf_pmu *pmu, const char *name); int perf_pmu__format_type(struct perf_pmu *pmu, const char *name); int perf_pmu__check_alias(struct perf_pmu *pmu, struct list_head *head_terms, struct perf_pmu_info *info); -struct list_head *perf_pmu__alias(struct perf_pmu *pmu, - struct list_head *head_terms); +struct perf_pmu_alias *perf_pmu__find_alias(struct perf_pmu *pmu, const char *event); 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); +int perf_pmu__format_parse(struct perf_pmu *pmu, int dirfd); bool perf_pmu__has_format(const struct perf_pmu *pmu, const char *name); bool is_pmu_core(const char *name); @@ -255,7 +254,7 @@ bool perf_pmu__file_exists(struct perf_pmu *pmu, const char *name); int perf_pmu__test(void); struct perf_event_attr *perf_pmu__get_default_config(struct perf_pmu *pmu); -void pmu_add_cpu_aliases_table(struct list_head *head, struct perf_pmu *pmu, +void pmu_add_cpu_aliases_table(struct perf_pmu *pmu, const struct pmu_events_table *table); char *perf_pmu__getcpuid(struct perf_pmu *pmu); |
