From fd292e0824e8453730e8ad039cc920f802562bea Mon Sep 17 00:00:00 2001 From: Qi Liu Date: Wed, 30 Nov 2022 19:01:16 +0800 Subject: [PATCH] perf pmu: Add alias match method to fit pmu_name of HiSilicon DDRC driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I63VF5 -------------------------------------------------------------------------- pmu_name of DDRC PMU on Hip09 platform is set as "hisi_sllcX_ddrcY_Z", current match method of pmu_name cannot fit DDRC pmu, so modify the method. Signed-off-by: Qi Liu Signed-off-by: Junhao He --- tools/perf/util/pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 7d86dcc941d9..8bc3e93292b1 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -739,7 +739,7 @@ static bool perf_pmu__valid_suffix(const char *pmu_name, char *tok) /* Ensure we end in a number */ while (1) { - if (!isdigit(*p)) + if (!isdigit(*p) && (*p != '_')) return false; if (*(++p) == 0) break; -- GitLab