Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp831262rdb; Fri, 25 Aug 2023 02:22:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGtu0k4FN4i3j9T3ZVuio8CVWVqgds6y0yFKu5NehE2ll7ppq+dM/FUKas073IXGmwbSTgJ X-Received: by 2002:a05:6402:518f:b0:522:582f:91af with SMTP id q15-20020a056402518f00b00522582f91afmr17851641edd.9.1692955349090; Fri, 25 Aug 2023 02:22:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692955349; cv=none; d=google.com; s=arc-20160816; b=kdZ5twBnVU5pLAy/WKi0eXdEp2Y07IQQQM/r9qvepneuyBLx8CGCiGcpUHDX5ZbUr+ CuH9l6k+zoJoI7chrYx7s529iz76scoa0DOaWIkoLxJcw+vGXgGhjchHqFhIx9Eb4Szs jV4D82ak8rrgixnhcqYY90vUZXI2xiZm7K/vXKunDui14M/uwylkj/58dv/06rjdqHAe t8XkNrZlP0dEBTJHXgvkhNuXQKaWgBM5U9eI70KdURKa3bt8gmqdJMBSAp7C4qWmjhPV CNqDlaLuJK3xmbX0qcxaZm9ozj/yk2SwTjCnTJ/RTlNlAMuGZs8sRZgmKPlgKUDbP9iz bqaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=YhesRfp0rWlG1BqTbVydx6rPiTR/MfEHMaNLAgXNuTk=; fh=lIlTeq0oiELndf6343Fi20K0hVEYEaY0WHJs02YKlPk=; b=HwomD7gY9ho7jHZJbMh8DrFonc+E5yZxsKuK2tSikz4IVFBeqT5HOlp1He4HYdtaRq nTNBCiEaAw165o1ryh+gcf0FytCX+JJ5aYwR0Phaz/H/eI6LmT7aQ9RuyiTTpK1qrA81 7aGzJqUPDPBfYilpC7ckBA8+7O/c/+cIGpfvWugaWSRQZAmUNTzFVto03mZfTl41dlr9 ayiSxuvoDDTCYSwnzifugdGYoM1uXZ/qU62smXS9p7tv/n4an79KTLQ7i4KQTLQP5eUl Eor2zWrYFvjxqdwRKsOyBQ9vfKPY2B84lkLMAdpRwTxv9RR0jEqsz4TCXw/Q6cYmYMcl PmHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o19-20020a056402039300b005221d280d58si869029edv.101.2023.08.25.02.22.00; Fri, 25 Aug 2023 02:22:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242575AbjHYGbG (ORCPT + 99 others); Fri, 25 Aug 2023 02:31:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236774AbjHYGan (ORCPT ); Fri, 25 Aug 2023 02:30:43 -0400 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 600AE1FDA; Thu, 24 Aug 2023 23:30:22 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R901e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=20;SR=0;TI=SMTPD_---0VqW2KOL_1692945017; Received: from 30.221.145.196(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VqW2KOL_1692945017) by smtp.aliyun-inc.com; Fri, 25 Aug 2023 14:30:19 +0800 Message-ID: Date: Fri, 25 Aug 2023 14:30:17 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH v7 5/8] perf test: Make matching_pmu effective To: Ian Rogers Cc: John Garry , 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 , Shuai Xue References: <1692606977-92009-1-git-send-email-renyu.zj@linux.alibaba.com> <1692606977-92009-6-git-send-email-renyu.zj@linux.alibaba.com> From: Jing Zhang In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2023/8/25 下午12:27, Ian Rogers 写道: > On Mon, Aug 21, 2023 at 1:36 AM Jing Zhang wrote: >> >> 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. > > Could you rebase this onto the latest perf-tools-next, I'd like to test this. > Ok, I will rebase it onto the latest perf-tools-next in next version. Thanks, Jing > Thanks, > Ian > >> 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 = "event=0x2b", >> .alias_long_desc = "ddr write-cycles event. Unit: uncore_sys_ddr_pmu ", >> - .matching_pmu = "uncore_sys_ddr_pmu", >> + .matching_pmu = "uncore_sys_ddr_pmu0", >> }; >> >> static const struct perf_pmu_test_event sys_ccn_pmu_read_cycles = { >> @@ -252,7 +252,7 @@ struct perf_pmu_test_pmu { >> }, >> .alias_str = "config=0x2c", >> .alias_long_desc = "ccn read-cycles event. Unit: uncore_sys_ccn_pmu ", >> - .matching_pmu = "uncore_sys_ccn_pmu", >> + .matching_pmu = "uncore_sys_ccn_pmu4", >> }; >> >> static const struct perf_pmu_test_event *sys_events[] = { >> @@ -599,6 +599,11 @@ static int __test_uncore_pmu_event_aliases(struct perf_pmu_test_pmu *test_pmu) >> struct pmu_event const *event = &test_event->event; >> >> 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)) { >> -- >> 1.8.3.1 >>