From 0a04df5ad6928c7ed6b3954273f7469a2e3d90a9 Mon Sep 17 00:00:00 2001 From: Qi Liu Date: Wed, 30 Nov 2022 19:01:16 +0800 Subject: [PATCH 167/201] 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 cad765e75ace..529236890a43 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -790,7 +790,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; -- 2.27.0