Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp618160rwb; Fri, 13 Jan 2023 01:58:25 -0800 (PST) X-Google-Smtp-Source: AMrXdXsxIExtqmsmEuNvLUzceBAkpwQFp97tUqHHV3Stj4dU9uLjVwkuGP40LDvc02hDqU/aIrvV X-Received: by 2002:a17:90a:f112:b0:226:6d:1a31 with SMTP id cc18-20020a17090af11200b00226006d1a31mr10644218pjb.49.1673603905516; Fri, 13 Jan 2023 01:58:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673603905; cv=none; d=google.com; s=arc-20160816; b=yjJTvbAcMxGvtWgNtN41b5Djvm4cCDWAZnl8/R4iM2OQVDP6iF76b42KsVqHiF3QHy krgtkBH/mCoKzJ2qsR7YvwuurpINAQu9uS0SepPIzfP2tPYSZGQIn8elQKgc7M6ct1vb W088p2SBnTqmb4ke6hUtLv4EQIOpcUN2dKhB1sRpxaQzsVjvYWLIfuMJmh/ShGrr20kB vfxKOKeyJb1A3b7AdacfUh0GjspJNVX+E8INdmn0RNYh2V1XUspxcEl+1qLf4fumDpfP RtRNTyzmtENBTvdlXrBlkU09UW4cauzlU1L23N3z+W7icH3EaxN8gWqiWAw9DsZd344n T0Nw== 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=ptvvnCUrDPHjK5NYTQFdnHhHW483yYHvCYrdmwNB+7E=; b=i978hpdvVt3cj1B4VF/4G2EUw4eYUbragqJhuvHF4WRc4dYnkdJeb/saa2hlLqxlbs +nTe8VH5JY4LuZ5r8r4zlgf8N8FVEvYlQTKTGF4kHCO2VZZ8v03gwp1mz+aHx9RoA3/3 LWm14bSlG8Ud9c+GHfuYCfiZHtytITne1LFOPB1aZ7vWwmesW8TTjdsnC7bQjGTGhFyz nQM1um2oMiTwGNr8MJxdpG6mJni3dOYLonAgvPCizA2tly0tSTJatE24LqdI5gYtQruj RpZMSqT0luNEPTdsHE9Eq1pz2J4qAJXA/HhW7GQbPKVW/v71MgzJra4oOqLbs1zkFow6 QJtQ== 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 y19-20020a17090aa41300b0021824fcc6b9si19323857pjp.63.2023.01.13.01.58.19; Fri, 13 Jan 2023 01:58:25 -0800 (PST) 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 S241146AbjAMJ2n (ORCPT + 51 others); Fri, 13 Jan 2023 04:28:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235391AbjAMJ1T (ORCPT ); Fri, 13 Jan 2023 04:27:19 -0500 Received: from out30-7.freemail.mail.aliyun.com (out30-7.freemail.mail.aliyun.com [115.124.30.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 725B042631; Fri, 13 Jan 2023 01:22:40 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0VZUDRTP_1673601754; Received: from srmbuffer011165236051.sqa.eu95(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VZUDRTP_1673601754) by smtp.aliyun-inc.com; Fri, 13 Jan 2023 17:22:35 +0800 From: Jing Zhang To: John Garry , Ian Rogers Cc: Xing Zhengjun , Will Deacon , James Clark , Mike Leach , Leo Yan , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andrew Kilroy , Shuai Xue , Zhuo Song , Jing Zhang Subject: [PATCH v7 2/9] perf jevent: Add general metrics support Date: Fri, 13 Jan 2023 17:22:13 +0800 Message-Id: <1673601740-122788-3-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1673601740-122788-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1673601740-122788-1-git-send-email-renyu.zj@linux.alibaba.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_MSPIKE_H2,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 Add general metrics support, so that some general metrics applicable to multiple architectures can be defined in the public json file like general events, and then add general metrics through "arch_std_event" in json file of different architecture. Signed-off-by: Jing Zhang --- tools/perf/pmu-events/jevents.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py index 4c398e0..0416b74 100755 --- a/tools/perf/pmu-events/jevents.py +++ b/tools/perf/pmu-events/jevents.py @@ -358,6 +358,8 @@ def preprocess_arch_std_files(archpath: str) -> None: for event in read_json_events(item.path, topic=''): if event.name: _arch_std_events[event.name.lower()] = event + if event.metric_name: + _arch_std_events[event.metric_name.lower()] = event def print_events_table_prefix(tblname: str) -> None: -- 1.8.3.1