Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1135218rwb; Sat, 14 Jan 2023 14:59:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXtrhOdRrJBkqd4wsdbNkHmblXAWQasiPvbD+oIX1x0XhDDlWZZPIA9tHUwJtzg9e5mKAont X-Received: by 2002:a05:6402:12cc:b0:494:cb3b:eb59 with SMTP id k12-20020a05640212cc00b00494cb3beb59mr29089436edx.12.1673737167700; Sat, 14 Jan 2023 14:59:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673737167; cv=none; d=google.com; s=arc-20160816; b=VQaIUeC5lO2PS55yeZbVmFeMbSdNFioVdeNWpmxyn3SHoEWKlVxq7bA6lSSD0KvqKe pF0vSSktrWvt483BCP3/u8cKURdXHJOP5Dg5ONPkFTcfz9YSDn0xBdBkYFBlfzptgTZ0 GRDifFwEAkE2TSL7xBvq/rbdc+gh4M99ChHk/L9fXIMsaFy4N/pqA0fIEMMOuSani+qe U8CkhyF5+mIitfgNQ71srBQNAHys9XS8XiLv+ugzVZJVZUpaXExu7vXNtzJ3ZsFLxg+T ZlDf0PCJ6zYtnLll8WL6tI9gwhO+sbrINPJE64EjmqI/mvtGzp/VILbi4wZgUgAxIgEJ PFQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0yzC8ZlGvRmgReUtkQlOS8z9agGk4HR8CX9kDFJuDeY=; b=RSmlr3g7PxHEq5W4hyejxl2rBgJZcNXwOxMeOxp7mt50zmeWA2b9GkWbbHoPS1ePVn aXn+F2Lb6OSSRWDytK+IuMCQPggcSY/jBX9g03ARdjAhwwBI7Md21u6HGY5E/W3ecyfl fnsfKvJF+u1aOSmFAbjnrS2ltMYz4IvkgQEt9LwpOGgDVIwogz7Ezp1xfMeMzLfilP7m TqRMCYk/x7lq8NF+XMuHs41mXGCLcxgbJKeHRTgSRvTqLLOLNzzn5vBvJU5pfMZjP36o 53qmK7QAlK5TqNy2fKNXWFYycKsvs/ARbOOFMcutvX/9rn3vzf5zTQIBRS8vdvEowu2v lCFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=KYfAF+1U; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i6-20020a508706000000b0048ed1688e26si25734508edb.174.2023.01.14.14.59.14; Sat, 14 Jan 2023 14:59:27 -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; dkim=pass header.i=@google.com header.s=20210112 header.b=KYfAF+1U; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230404AbjANWjt (ORCPT + 52 others); Sat, 14 Jan 2023 17:39:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230367AbjANWjl (ORCPT ); Sat, 14 Jan 2023 17:39:41 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93599A5F0 for ; Sat, 14 Jan 2023 14:39:40 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id q8so5708728wmo.5 for ; Sat, 14 Jan 2023 14:39:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0yzC8ZlGvRmgReUtkQlOS8z9agGk4HR8CX9kDFJuDeY=; b=KYfAF+1UgLuuLeMR43j+XU2GWx0P59DA4XS0dEkOV0S8nCfYfWytWv1439IOuYwbVc +z+/F+o/nWghbbVtFilc2W+Vk+i4zzKYx+BD9Px4WUR5HGuDya2C/VJesGjoXhizHjfp +2Atk3cdDvdBJi8QQqyjOGW2xsziQt4NWfxSxIBpLWJ/8NzwTfYVkmaAvhuSRKDs00mK LJhLUgCfdrMu20+tb2y3RiwSGDPluHMblXd5nCtDpdZXu287uN6b5mXsqIl6XgpHvpzo 22/GtNGDPB/HS8B2FdM9TkIYGUgKL2Yd7R6bLqwAfLrFIwUyfuw4S69vOvfZJe6Izfm2 1I4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0yzC8ZlGvRmgReUtkQlOS8z9agGk4HR8CX9kDFJuDeY=; b=Lh1KD9n8XVW/TrzGZPPhv2aaOz3rb+Fghi8lTALgq9IE8rl/4qb7OH2/9o6KnCy3xC +IrpPR++Jo3hyx7oBvj8EokE7i8qo+HX/Cyz2sRa2rrj64Ely+nHz4/dR/I3zwNZJzT5 6jcpGh4Gw31PNNrsGU/s+2wV2gvvadxjLR4Q+XtsTX4uuEL/xBTUh8d3gjkzObEfDdLm bC+7p4C2yYoptM/Y+GfAI/A+G/5PIotfuQVLddh09Q6MoHD2FEhzCcEdwN9cl+kIO/Rr 2ivT8NICykhh3jq3/LcRm1t8rO2gFyT8O8kxwQkV8FrgmmlTkUQU8h/CHTPr9udPh4eB dtAQ== X-Gm-Message-State: AFqh2kqs9QHxy4gDv8LG+6DgGDEGiEpvdXQfLKtVyBhuPzYILLmrqBgK 4nrBVXgMHEeFDlj/ETfPERgbQf016hw04tDEtDqY5A== X-Received: by 2002:a05:600c:3b04:b0:3d0:50c4:432c with SMTP id m4-20020a05600c3b0400b003d050c4432cmr4337596wms.67.1673735978906; Sat, 14 Jan 2023 14:39:38 -0800 (PST) MIME-Version: 1.0 References: <1673601740-122788-1-git-send-email-renyu.zj@linux.alibaba.com> <1673601740-122788-3-git-send-email-renyu.zj@linux.alibaba.com> In-Reply-To: <1673601740-122788-3-git-send-email-renyu.zj@linux.alibaba.com> From: Ian Rogers Date: Sat, 14 Jan 2023 14:39:26 -0800 Message-ID: Subject: Re: [PATCH v7 2/9] perf jevent: Add general metrics support To: Jing Zhang Cc: John Garry , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,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 On Fri, Jan 13, 2023 at 1:22 AM Jing Zhang wrote: > > 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 Acked-by: Ian Rogers Thanks, Ian > --- > 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 >