Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp795711rdb; Fri, 25 Aug 2023 00:58:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2yuNUM/l8YOLG/4SJcM0MRPxEveu/Efank7dJ0Z0Crg9B19/XS8oqYNwkHVQxVgCcV0iT X-Received: by 2002:aa7:dcc4:0:b0:523:2e0e:5462 with SMTP id w4-20020aa7dcc4000000b005232e0e5462mr10215627edu.42.1692950306621; Fri, 25 Aug 2023 00:58:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692950306; cv=none; d=google.com; s=arc-20160816; b=R/P1i/aooorLpjRVjb65f2WPWkRciNXItxW9dbPYMsgH8ON39WKTzB4JI+HWVSdCcR 65R1iF+Tei89YqXPxwJ3SWVXUcrwLIpR0T+ls+nEJdseDRTsj+Cv3WDusk+2nbyeE3ie h71jN/9Tbw2xohmKBx1vkjIediYo9dLFmBQmStn9IPlZLq+o8TZQskvWOqdyMGD2D3ht sEm9JAGLi+nKU8trCILrTKzvXuYehar0zDgCogfhnswJNSASPN3GlGuTVQO2fCR/5F1H DQ1T3eduLpWaialuwQCYfYjkCO5PU66VF9L4d6/U2Aggem6utnwosxNq54hAL43vmRX9 pDQg== 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=EpLjDwFBKMliRosNF41wrybYE/E3Vidr4sdy2c3pg2Y=; fh=lIlTeq0oiELndf6343Fi20K0hVEYEaY0WHJs02YKlPk=; b=0qICvuyn0qycn8+wcQ2GhcEa4E2vXmFuyQtrqAxbZbehAHAS4ZZELasDDdgQb8i62T fiqVGGm//jt5YdWXlIVusfs0ta93Q9XuMrsTfZ30kB/qITRiNwfpQxNtaW7YYxz9VA4k mxW5KnIqviVeJzUWkUKNOAHsdo3hp4S77f8DVdnHiPVoIzOGP6n3ERpY/RmPp8e3XVkt jNdOtjED99nxd4jsmqD7s75BvzDu9xY1Z7yWHAxdm0+gaFn8OerlrYhdobvFpd0HRmGY 3SN3TR+xVY0/dF/rjRgj3Rn4QYOaJg8iVYtPbm2+XbvnMNmP7cAVIPyqnpSGRU8eeOCR fABw== 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 a18-20020aa7d752000000b005255d1088ffsi564501eds.671.2023.08.25.00.57.59; Fri, 25 Aug 2023 00:58:26 -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 S237637AbjHYGbi (ORCPT + 99 others); Fri, 25 Aug 2023 02:31:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235789AbjHYGbH (ORCPT ); Fri, 25 Aug 2023 02:31:07 -0400 Received: from out30-118.freemail.mail.aliyun.com (out30-118.freemail.mail.aliyun.com [115.124.30.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1D0E1FE9; Thu, 24 Aug 2023 23:31:02 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=20;SR=0;TI=SMTPD_---0VqW0XgJ_1692945056; Received: from 30.221.145.196(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VqW0XgJ_1692945056) by smtp.aliyun-inc.com; Fri, 25 Aug 2023 14:30:58 +0800 Message-ID: Date: Fri, 25 Aug 2023 14:30:56 +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 6/8] perf test: Add pmu-event test for "Compat" and new event_field. 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-7-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:30, Ian Rogers 写道: > On Mon, Aug 21, 2023 at 1:36 AM Jing Zhang wrote: >> >> Add new event test for uncore system event which is used to verify the >> functionality of "Compat" matching multiple identifiers and the new event >> fields "EventIdCode" and "Type". >> >> Signed-off-by: Jing Zhang > > Thanks for the tests! I've no issue with them beside the already > mentioned ';'. This will need updating for: > https://lore.kernel.org/lkml/20230824183212.374787-1-irogers@google.com/ > https://lore.kernel.org/lkml/20230825024002.801955-1-irogers@google.com/ > Ok, will do. Thanks, Jing > Thanks, > Ian > >> --- >> .../pmu-events/arch/test/test_soc/sys/uncore.json | 8 ++++ >> tools/perf/pmu-events/empty-pmu-events.c | 8 ++++ >> tools/perf/tests/pmu-events.c | 55 ++++++++++++++++++++++ >> 3 files changed, 71 insertions(+) >> >> diff --git a/tools/perf/pmu-events/arch/test/test_soc/sys/uncore.json b/tools/perf/pmu-events/arch/test/test_soc/sys/uncore.json >> index c7e7528..06b886d 100644 >> --- a/tools/perf/pmu-events/arch/test/test_soc/sys/uncore.json >> +++ b/tools/perf/pmu-events/arch/test/test_soc/sys/uncore.json >> @@ -12,5 +12,13 @@ >> "EventName": "sys_ccn_pmu.read_cycles", >> "Unit": "sys_ccn_pmu", >> "Compat": "0x01" >> + }, >> + { >> + "BriefDescription": "Counts total cache misses in first lookup result (high priority).", >> + "NodeType": "0x05", >> + "EventIdCode": "0x01", >> + "EventName": "sys_cmn_pmu.hnf_cache_miss", >> + "Unit": "sys_cmn_pmu", >> + "Compat": "434*;436*;43c*;43a01" >> } >> ] >> diff --git a/tools/perf/pmu-events/empty-pmu-events.c b/tools/perf/pmu-events/empty-pmu-events.c >> index e74defb..25be18a 100644 >> --- a/tools/perf/pmu-events/empty-pmu-events.c >> +++ b/tools/perf/pmu-events/empty-pmu-events.c >> @@ -245,6 +245,14 @@ struct pmu_events_map { >> .pmu = "uncore_sys_ccn_pmu", >> }, >> { >> + .name = "sys_cmn_pmu.hnf_cache_miss", >> + .event = "type=0x05,eventid=0x01", >> + .desc = "Counts total cache misses in first lookup result (high priority). Unit: uncore_sys_cmn_pmu ", >> + .compat = "434*;436*;43c*;43a01", >> + .topic = "uncore", >> + .pmu = "uncore_sys_cmn_pmu", >> + }, >> + { >> .name = 0, >> .event = 0, >> .desc = 0, >> diff --git a/tools/perf/tests/pmu-events.c b/tools/perf/tests/pmu-events.c >> index 3204252..79fb3e2 100644 >> --- a/tools/perf/tests/pmu-events.c >> +++ b/tools/perf/tests/pmu-events.c >> @@ -255,9 +255,24 @@ struct perf_pmu_test_pmu { >> .matching_pmu = "uncore_sys_ccn_pmu4", >> }; >> >> +static const struct perf_pmu_test_event sys_cmn_pmu_hnf_cache_miss = { >> + .event = { >> + .name = "sys_cmn_pmu.hnf_cache_miss", >> + .event = "type=0x05,eventid=0x01", >> + .desc = "Counts total cache misses in first lookup result (high priority). Unit: uncore_sys_cmn_pmu ", >> + .topic = "uncore", >> + .pmu = "uncore_sys_cmn_pmu", >> + .compat = "434*;436*;43c*;43a01", >> + }, >> + .alias_str = "type=0x5,eventid=0x1", >> + .alias_long_desc = "Counts total cache misses in first lookup result (high priority). Unit: uncore_sys_cmn_pmu ", >> + .matching_pmu = "uncore_sys_cmn_pmu0", >> +}; >> + >> static const struct perf_pmu_test_event *sys_events[] = { >> &sys_ddr_pmu_write_cycles, >> &sys_ccn_pmu_read_cycles, >> + &sys_cmn_pmu_hnf_cache_miss, >> NULL >> }; >> >> @@ -704,6 +719,46 @@ static int __test_uncore_pmu_event_aliases(struct perf_pmu_test_pmu *test_pmu) >> &sys_ccn_pmu_read_cycles, >> }, >> }, >> + { >> + .pmu = { >> + .name = (char *)"uncore_sys_cmn_pmu0", >> + .is_uncore = 1, >> + .id = (char *)"43401", >> + }, >> + .aliases = { >> + &sys_cmn_pmu_hnf_cache_miss, >> + }, >> + }, >> + { >> + .pmu = { >> + .name = (char *)"uncore_sys_cmn_pmu0", >> + .is_uncore = 1, >> + .id = (char *)"43602", >> + }, >> + .aliases = { >> + &sys_cmn_pmu_hnf_cache_miss, >> + }, >> + }, >> + { >> + .pmu = { >> + .name = (char *)"uncore_sys_cmn_pmu0", >> + .is_uncore = 1, >> + .id = (char *)"43c03", >> + }, >> + .aliases = { >> + &sys_cmn_pmu_hnf_cache_miss, >> + }, >> + }, >> + { >> + .pmu = { >> + .name = (char *)"uncore_sys_cmn_pmu0", >> + .is_uncore = 1, >> + .id = (char *)"43a01", >> + }, >> + .aliases = { >> + &sys_cmn_pmu_hnf_cache_miss, >> + }, >> + } >> }; >> >> /* Test that aliases generated are as expected */ >> -- >> 1.8.3.1 >>