Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4418426rwb; Tue, 17 Jan 2023 00:04:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXvG5T3S47DEho1LQPbljy3Z5XAFzyeWSNVN9haD1nl5IRAeAKH8qUaD1ORgbfGJ6mz+sUEX X-Received: by 2002:aa7:cb55:0:b0:499:c2c7:1534 with SMTP id w21-20020aa7cb55000000b00499c2c71534mr12466630edt.24.1673942679692; Tue, 17 Jan 2023 00:04:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673942679; cv=none; d=google.com; s=arc-20160816; b=yEue6JRZ+ScPMvO0AlM/jdEhvR6cuL0YqXawgNqEM/sBFIkYqwRdm54w7ct4KEvy/3 8l6YHf59SFIe0MC45khulbPqbKsbffDFA/NYqzZBVeA6t+KIb6WLFJXFvpRAsx1t77Hc 22z5ZGoPVBLIWTM9OjPiNI3Ol10EnsgXu92cHrN72tZLgNgBZ/6TrLWHCndHSA0dtv4Y K+V1J8nyUAdZ6x5t2YMN1dtxbCpYBt8yKPFbBq1MpE3eLDPpsPMM/UWe0dNcTexWVK7e GxBxUgUlrpMtW9gKILmX3hRJA51cTNK0Qe8R85u/2Y+ARSfvIyPjJSuUTox7rhTL5zOi lfaQ== 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=fQR5rwp3hJHh4CgBE17Oh1aeKNiDZ4Y6bbN6y5UHH1E=; b=z2G23EZ7pbUxvUE+y3YRQSk9OkR0xe7JwoFwoSfjXH+7N+aExotakLoDm0VATwL5qP fzndiwZiruu5EvCyNTlcpT1Pi8udT/+re3Y3AOd/YmhgUx3Xm/quU7NSj6H48E3cZvll 7kPd20Dhe0sX3PMTOr4kiN3I79bcCAbYiZl4ziWS+1WeRzUXfq7qxp7frfsF59U7LUip LB5HBKYANn+6xb0df0+osJPZS2o8YKqjxzqhdNkXcSAj9Fj86k3EjFN7xZxkPRwKp/84 o3MgrpRw2X8YLv0o5hJ+K5Gspfa5h2zoS5tfWPej9mK7WIF5VUS+SZ4UHplT9cWRbANs uDRw== 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 xa14-20020a170906fd8e00b00787b9cd2fe3si31457536ejb.844.2023.01.17.00.04.25; Tue, 17 Jan 2023 00:04:39 -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 S235861AbjAQHaE (ORCPT + 49 others); Tue, 17 Jan 2023 02:30:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232347AbjAQH35 (ORCPT ); Tue, 17 Jan 2023 02:29:57 -0500 Received: from out30-6.freemail.mail.aliyun.com (out30-6.freemail.mail.aliyun.com [115.124.30.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C766223877; Mon, 16 Jan 2023 23:29:55 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0VZm6e2p_1673940590; Received: from srmbuffer011165236051.sqa.eu95(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VZm6e2p_1673940590) by smtp.aliyun-inc.com; Tue, 17 Jan 2023 15:29:50 +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 v8 2/9] perf jevent: Add general metrics support Date: Tue, 17 Jan 2023 15:29:26 +0800 Message-Id: <1673940573-90503-3-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1673940573-90503-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1673940573-90503-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 Reviewed-by: John Garry Acked-by: Ian Rogers --- 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