Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5347276rwr; Mon, 24 Apr 2023 02:45:07 -0700 (PDT) X-Google-Smtp-Source: AKy350aE10KMbeS1870N+Fasw/o3sHoY7foMqNIzZFBQgYXp/7452QgMBSY+XoYGMofYuyPeHTFN X-Received: by 2002:a05:6a21:6817:b0:f0:164b:fa5d with SMTP id wr23-20020a056a21681700b000f0164bfa5dmr15151491pzb.15.1682329506688; Mon, 24 Apr 2023 02:45:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682329506; cv=none; d=google.com; s=arc-20160816; b=m2jptBCLdq3zz3PG/rJpUsT8O0DGTAbT0yYEJd0INIec3nsK1Zs074Qczrm7qbig3r wyKI9nhcRrvO7Uyva/Xq3Gi/cA5IEV0qwxaxaXT96nEcT1XLjyBLyHVQILkC+yPcp+8Z O+arfG4IxrTldSn43tU8f5wQx8xILy4G0b//9cMFPYCQ+w89Q3gj6zbpzBQYzx6NhRDK WYIhYhlaE3D/gfcJBsFUkUMEOR/jUZE53pSuDPXaAWNMTk1cGnsS6sz+DbqNLnCrVEn1 dNH1tV7PdB+uCwb9ysmwEidMZ+3q9mw+3H6iSoxqAN3tK0Rdm4onEflZIRiuOZDIWP41 +muQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=B1H5CUsshez5bvfPn8F2bm6qOvAmPZF5ChrcOGT0aY8=; b=MEpf6Do2wLqFpMqTIYfQcx5VRDH5T4ZBX7SvL1QDKwbwyd9lO5iAA668fnCrRBHIDv XbozkevwJ7OFpQFl0btYmfd4obwkiJ1pLiAHi3qE5a4So7QbdBAOL1eGUdkR/FQbS32e rdky56pV/x9KnSihnsDC5CWRKsS3a3fqQGWeM87p5Eu5/OV31xR5RChPPCjJjLImUobQ FVLQ8s2kSLFmmDHA0/fYESaer0LwPn9xV82qFTYXV8N62byfqEutqxVB1vO7NECZI7WH toUTMzrNYHzzYJaiF3desJOdOiHJ3xKo30h1ELudTvLoF5pp47nJ4Rh/fQbuJ/MCGlSP isQA== 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 l186-20020a6391c3000000b0051854bde329si10923030pge.367.2023.04.24.02.44.54; Mon, 24 Apr 2023 02:45:06 -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 S229458AbjDXJoi (ORCPT + 99 others); Mon, 24 Apr 2023 05:44:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229581AbjDXJoh (ORCPT ); Mon, 24 Apr 2023 05:44:37 -0400 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C97432D48; Mon, 24 Apr 2023 02:44:33 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R911e4;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=18;SR=0;TI=SMTPD_---0VgsU8dR_1682329459; Received: from srmbuffer011165236051.sqa.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VgsU8dR_1682329459) by smtp.aliyun-inc.com; Mon, 24 Apr 2023 17:44:28 +0800 From: Jing Zhang To: John Garry , Ian Rogers , Will Deacon , Shuai Xue Cc: James Clark , Mike Leach , Leo Yan , Mark Rutland , Ilkka Koskinen , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, Zhuo Song , Jing Zhang Subject: [PATCH v2 0/5] Add JSON metrics for arm CMN and Yitian710 DDR Date: Mon, 24 Apr 2023 17:44:11 +0800 Message-Id: <1682329456-19418-1-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,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 Changes since RFC: - Refact arm-cmn PMU identifier. - Not add arm-cmn PMU aliasing currently because it's Eventcode is difficult to define. - Rename ali_drw PMU identifier and Unit name. - Divide ali_drw PMU metric and aliasing into two patches. Add an identifier sysfs file for the yitian710 SoC DDR and arm CMN to allow userspace to identify the specific implementation of the device, so that the perf tool can match the corresponding uncore events and metrics through the identifier. Then added several general CMN700 metrics and yitian710 soc DDR metrics. $perf list: ... ali_drw: hif_rmw [A Read-Modify-Write Op at HIF interface. 64B. Unit: ali_drw] hif_hi_pri_rd [A high priority Read at HIF interface. 64B. Unit: ali_drw] hif_rd [A Read Op at HIF interface. 64B. Unit: ali_drw] hif_rd_or_wr [A Write or Read Op at HIF interface. 64B. Unit: ali_drw] hif_wr [A Write Op at HIF interface. 64B. Unit: ali_drw] ... $perf stat -M ddr_read_bandwidth.all ./test Performance counter stats for 'system wide': 38,150 hif_rd # 2.4 MB/s ddr_read_bandwidth.all 1,000,957,941 ns duration_time 1.000957941 seconds time elapsed Jing Zhang (5): driver/perf: Add identifier sysfs file for CMN perf vendor events: Add JSON metrics for CMN-700 driver/perf: Add identifier sysfs file for Yitian 710 DDR perf jevents: Add support for Yitian 710 DDR PMU aliasing perf vendor events: Add JSON metrics for Yitian 710 DDR drivers/perf/alibaba_uncore_drw_pmu.c | 27 ++ drivers/perf/arm-cmn.c | 49 +++ .../arch/arm64/arm/cmn700/sys/metrics.json | 74 ++++ .../arm64/freescale/yitian710/sys/ali_drw.json | 373 +++++++++++++++++++++ .../arm64/freescale/yitian710/sys/metrics.json | 20 ++ tools/perf/pmu-events/jevents.py | 2 + 6 files changed, 545 insertions(+) create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cmn700/sys/metrics.json create mode 100644 tools/perf/pmu-events/arch/arm64/freescale/yitian710/sys/ali_drw.json create mode 100644 tools/perf/pmu-events/arch/arm64/freescale/yitian710/sys/metrics.json -- 1.8.3.1