From nobody Wed Sep 10 02:39:12 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D48DC04FE2 for ; Mon, 7 Aug 2023 07:52:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231350AbjHGHwY (ORCPT ); Mon, 7 Aug 2023 03:52:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231225AbjHGHvr (ORCPT ); Mon, 7 Aug 2023 03:51:47 -0400 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FE4A1703; Mon, 7 Aug 2023 00:51:43 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R751e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0VpC-04Z_1691394697; Received: from srmbuffer011165236051.sqa.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VpC-04Z_1691394697) by smtp.aliyun-inc.com; Mon, 07 Aug 2023 15:51:38 +0800 From: Jing Zhang To: John Garry , Ian Rogers Cc: Will Deacon , James Clark , Arnaldo Carvalho de Melo , Mark Rutland , Mike Leach , Leo Yan , Namhyung Kim , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Adrian Hunter , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-doc@vger.kernel.org, Zhuo Song , Jing Zhang , Shuai Xue Subject: [PATCH v6 4/7] perf test: Fix matching_pmu Date: Mon, 7 Aug 2023 15:51:22 +0800 Message-Id: <1691394685-61240-5-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1691394685-61240-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1691394685-61240-1-git-send-email-renyu.zj@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The perf_pmu_test_event.matching_pmu didn't work. No matter what its value is, it does not affect the test results. So let matching_pmu be used for matching perf_pmu_test_pmu.pmu.name. Fixes: 5a65c0c8f6fd ("perf test: Re-add pmu-event uncore PMU alias test") Signed-off-by: Jing Zhang Reviewed-by: John Garry --- tools/perf/tests/pmu-events.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/perf/tests/pmu-events.c b/tools/perf/tests/pmu-events.c index 1dff863b..3204252 100644 --- a/tools/perf/tests/pmu-events.c +++ b/tools/perf/tests/pmu-events.c @@ -238,7 +238,7 @@ struct perf_pmu_test_pmu { }, .alias_str =3D "event=3D0x2b", .alias_long_desc =3D "ddr write-cycles event. Unit: uncore_sys_ddr_pmu ", - .matching_pmu =3D "uncore_sys_ddr_pmu", + .matching_pmu =3D "uncore_sys_ddr_pmu0", }; =20 static const struct perf_pmu_test_event sys_ccn_pmu_read_cycles =3D { @@ -252,7 +252,7 @@ struct perf_pmu_test_pmu { }, .alias_str =3D "config=3D0x2c", .alias_long_desc =3D "ccn read-cycles event. Unit: uncore_sys_ccn_pmu ", - .matching_pmu =3D "uncore_sys_ccn_pmu", + .matching_pmu =3D "uncore_sys_ccn_pmu4", }; =20 static const struct perf_pmu_test_event *sys_events[] =3D { @@ -599,6 +599,11 @@ static int __test_uncore_pmu_event_aliases(struct perf= _pmu_test_pmu *test_pmu) struct pmu_event const *event =3D &test_event->event; =20 if (!strcmp(event->name, alias->name)) { + if (strcmp(pmu_name, test_event->matching_pmu)) { + pr_debug("testing aliases uncore PMU %s: mismatched matching_pmu, %s = vs %s\n", + pmu_name, test_event->matching_pmu, pmu_name); + continue; + } if (compare_alias_to_test_event(alias, test_event, pmu_name)) { --=20 1.8.3.1