From 068cabdac7c1604ec341e915e0920d8d6545d670 Mon Sep 17 00:00:00 2001 From: John Garry Date: Thu, 29 Jul 2021 21:56:24 +0800 Subject: [PATCH 179/201] perf pmu: Make pmu_add_sys_aliases() public mainline inclusion from mainline-v5.15-rc1 commit e199f47f159d72f12b91d2b33cee78f95ff8ff59 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8C0CX Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e199f47f159d72f12b91d2b33cee78f95ff8ff59 ---------------------------------------------------------------------- Function pmu_add_sys_aliases() will be required for the PMU events test for system events aliases, so make it public. Signed-off-by: John Garry Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jin Yao Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linuxarm@huawei.com Link: https //lore.kernel.org/r/1627566986-30605-10-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: hongrongxuan Conflicts: tools/perf/util/pmu.h --- tools/perf/util/pmu.c | 2 +- tools/perf/util/pmu.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 172819439cdd..acdf4e70b99d 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -968,7 +968,7 @@ static int pmu_add_sys_aliases_iter_fn(struct pmu_event *pe, void *data) return 0; } -static void pmu_add_sys_aliases(struct list_head *head, struct perf_pmu *pmu) +void pmu_add_sys_aliases(struct list_head *head, struct perf_pmu *pmu) { struct pmu_sys_event_iter_data idata = { .head = head, diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h index a9942e5b076d..75aeb3a43cfb 100644 --- a/tools/perf/util/pmu.h +++ b/tools/perf/util/pmu.h @@ -66,6 +66,7 @@ struct perf_pmu_alias { }; struct perf_pmu *perf_pmu__find(const char *name); +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); -- 2.27.0