Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp994640rdh; Sun, 24 Sep 2023 23:00:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3cCyxuYfr44QbAC5KCF+Liyd5F+aVpO1pI02sXqD6iymAe1bYUB3DSuybTY9nl/ROtC3V X-Received: by 2002:a05:6a21:33a7:b0:134:a478:5e4a with SMTP id yy39-20020a056a2133a700b00134a4785e4amr4379432pzb.17.1695621626115; Sun, 24 Sep 2023 23:00:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695621626; cv=none; d=google.com; s=arc-20160816; b=mCpK+uVdY1pIFQByE5NWikDJr2AbEIoDsA1VOjShJltMCrc6srlaKdikNW3+fctNxV fXHfREuFGJuGqNBlEXrWCwlF7FkS6iOczk6kFSd7Mutvf+2WR5wSOlSPsZoMcqB3bPdV 412+tWLJsgFKZAQL24hFmUi2DkiDaiowYbK/LOXgymIKvxkSPLZx7AQaJYDlW97E+QYz n/1XTJKEvKLCbJEVGwjUXEhhs8F9qgK04gKd3k8RdIn761K6ysiFuWy7PFwTqRcv4tFE YjALOO0ISGjHkoFmOB3Fnhf7kUEfZq/POllKFx17EEiPzczclt/OIKcbA8YP2bYsBUDU vC6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=OCvCm5AdXTL16VEeliA3GTDgL7BfY4hLvNtvyag+nkw=; fh=9KkEy5BETl+n6HvtEwBLK4NkRgCt0Iv6FwLxABl1azE=; b=xO9xSiHCzHqcGzLdPfe45pIpkT9q+1Od3eGNpUmWUch6sjCxs7PR8N65m13gv5HttK 6oRcViNbWSrU09x7SwnN2hyYBOHCxfxa+QBRHTZgmkrf+qCYtqQsF+raBmeW4W/qa14Z 7jBTbRCdMhYAOhSndmOhx9uJZPpROxtRlgzwXGx5F7+YmBEodOJNc6gTee263IzYMA2m wBqGqAnkg9auqwCT6nFTCB1uoTAvYwbgtpSZeLdIpYUmDi00oqey6Z8/tqxgHmYWmc9E XczsTdJjspRpp/F6H3totRo9bbJFo1Qyl+OHAikamMMEK5nmgNzPcSAGrsc6i9B8KNqS BtyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id x4-20020a17090a6c0400b00274b944508fsi11416068pjj.39.2023.09.24.23.00.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 23:00:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id BC2CF801C588; Sun, 24 Sep 2023 22:58:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231995AbjIYF6r (ORCPT + 99 others); Mon, 25 Sep 2023 01:58:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230155AbjIYF6h (ORCPT ); Mon, 25 Sep 2023 01:58:37 -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 0CF32EE; Sun, 24 Sep 2023 22:58:30 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R331e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0Vsl7J2W_1695621507; Received: from srmbuffer011165236051.sqa.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0Vsl7J2W_1695621507) by smtp.aliyun-inc.com; Mon, 25 Sep 2023 13:58:27 +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 v10 4/7] perf test: Make matching_pmu effective Date: Mon, 25 Sep 2023 13:57:21 +0800 Message-Id: <1695621444-56530-5-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1695621444-56530-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1695621444-56530-1-git-send-email-renyu.zj@linux.alibaba.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Sun, 24 Sep 2023 22:58:55 -0700 (PDT) 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. Signed-off-by: Jing Zhang Reviewed-by: John Garry --- tools/perf/tests/pmu-events.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/perf/tests/pmu-events.c b/tools/perf/tests/pmu-events.c index f5321fb..0cf572f 100644 --- a/tools/perf/tests/pmu-events.c +++ b/tools/perf/tests/pmu-events.c @@ -245,7 +245,7 @@ struct perf_pmu_test_pmu { }, .alias_str = "event=0x2b", .alias_long_desc = "ddr write-cycles event", - .matching_pmu = "uncore_sys_ddr_pmu", + .matching_pmu = "uncore_sys_ddr_pmu0", }; static const struct perf_pmu_test_event sys_ccn_pmu_read_cycles = { @@ -259,7 +259,7 @@ struct perf_pmu_test_pmu { }, .alias_str = "config=0x2c", .alias_long_desc = "ccn read-cycles event", - .matching_pmu = "uncore_sys_ccn_pmu", + .matching_pmu = "uncore_sys_ccn_pmu4", }; static const struct perf_pmu_test_event *sys_events[] = { @@ -615,6 +615,12 @@ static int __test_uncore_pmu_event_aliases(struct perf_pmu_test_pmu *test_pmu) .count = &matched_count, }; + 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); + return -1; + } + err = perf_pmu__find_event(pmu, event->name, &args, test_core_pmu_event_aliases_cb); if (err) { -- 1.8.3.1