[tip: perf/urgent] perf pmu: Make pmu_uncore_alias_match() public

From: tip-bot2 for John Garry
Date: Sat Apr 04 2020 - 04:42:20 EST


The following commit has been merged into the perf/urgent branch of tip:

Commit-ID: 5b9a50001b2c23f90f2a21db4763f3a9599588c4
Gitweb: https://git.kernel.org/tip/5b9a50001b2c23f90f2a21db4763f3a9599588c4
Author: John Garry <john.garry@xxxxxxxxxx>
AuthorDate: Tue, 17 Mar 2020 19:02:18 +08:00
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitterDate: Tue, 24 Mar 2020 10:35:59 -03:00

perf pmu: Make pmu_uncore_alias_match() public

The perf pmu-events test will want to use pmu_uncore_alias_match(), so
make it public.

Signed-off-by: John Garry <john.garry@xxxxxxxxxx>
Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>
Cc: James Clark <james.clark@xxxxxxx>
Cc: Joakim Zhang <qiangqing.zhang@xxxxxxx>
Cc: Mark Rutland <mark.rutland@xxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Will Deacon <will@xxxxxxxxxx>
Cc: linuxarm@xxxxxxxxxx
Link: http://lore.kernel.org/lkml/1584442939-8911-7-git-send-email-john.garry@xxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
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 55129d0..616fbda 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -698,7 +698,7 @@ struct pmu_events_map *perf_pmu__find_map(struct perf_pmu *pmu)
return map;
}

-static bool pmu_uncore_alias_match(const char *pmu_name, const char *name)
+bool pmu_uncore_alias_match(const char *pmu_name, const char *name)
{
char *tmp = NULL, *tok, *str;
bool res;
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index b756946..5fb3f16 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -103,6 +103,7 @@ void pmu_add_cpu_aliases_map(struct list_head *head, struct perf_pmu *pmu,
struct pmu_events_map *map);

struct pmu_events_map *perf_pmu__find_map(struct perf_pmu *pmu);
+bool pmu_uncore_alias_match(const char *pmu_name, const char *name);

int perf_pmu__convert_scale(const char *scale, char **end, double *sval);