Message ID | 1682329456-19418-1-git-send-email-renyu.zj@linux.alibaba.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2622122vqo; Mon, 24 Apr 2023 02:51:59 -0700 (PDT) X-Google-Smtp-Source: AKy350aPdvjNJC7n8HNbrsBOFcRSVexSECB/jf6PKZatz02VDIPhDQBvpY0CAAxgqtmZAAGsca7B X-Received: by 2002:a17:902:e294:b0:1a6:4532:1149 with SMTP id o20-20020a170902e29400b001a645321149mr11459063plc.44.1682329918989; Mon, 24 Apr 2023 02:51:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682329918; cv=none; d=google.com; s=arc-20160816; b=XZdvDzOMt/llxPDUm2gAiMP8qX6SGBhd6VSF5oOH1V4drZItQsQ1GOys5Fc/GNrtdt mfDJsi8SxQ8FBxuLB39SYcefkMRD21EutYyUTp6NGxvwqEtN0Iw7SfjK47uvdjhMXOxr fE8b27FXCR8OBLEc1gi1DAf5ZuH5e80/VwjUIG47WlHwihhkgAehtgvIHr3hzTUl2uqj 5zrPQj1TX0WsKm23UR40xxNKK8JUqCnAk761ZBAEb3J22mAXmo/jYBeO090VmPp9ywQK e8JCTgQWjKuhUADQPJjhTCoirrvR1TnCndKzShUiAk9x3O87WWkdoyaULc5iRGaEyoEj F28Q== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020a1709027e0900b0019e9c8e51f4si6467131plm.165.2023.04.24.02.51.44; Mon, 24 Apr 2023 02:51:58 -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 S231248AbjDXJoj (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Mon, 24 Apr 2023 05:44:39 -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 <rfc822;linux-kernel@vger.kernel.org>); 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 <renyu.zj@linux.alibaba.com> To: John Garry <john.g.garry@oracle.com>, Ian Rogers <irogers@google.com>, Will Deacon <will@kernel.org>, Shuai Xue <xueshuai@linux.alibaba.com> Cc: James Clark <james.clark@arm.com>, Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linaro.org>, Mark Rutland <mark.rutland@arm.com>, Ilkka Koskinen <ilkka@os.amperecomputing.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Adrian Hunter <adrian.hunter@intel.com>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, Zhuo Song <zhuo.song@linux.alibaba.com>, Jing Zhang <renyu.zj@linux.alibaba.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764050777069410768?= X-GMAIL-MSGID: =?utf-8?q?1764050777069410768?= |
Series |
Add JSON metrics for arm CMN and Yitian710 DDR
|
|
Message
Jing Zhang
April 24, 2023, 9:44 a.m. UTC
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
Comments
On Mon, Apr 24, 2023 at 2:44 AM Jing Zhang <renyu.zj@linux.alibaba.com> wrote: > > 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 The perf tool changes all make sense. John Garry is more of an expert on the ARM part of this than me though. Acked-by: Ian Rogers <irogers@google.com> Thanks, Ian > 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 >
在 2023/4/30 上午5:01, Ian Rogers 写道: > On Mon, Apr 24, 2023 at 2:44 AM Jing Zhang <renyu.zj@linux.alibaba.com> wrote: >> >> 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 > > The perf tool changes all make sense. John Garry is more of an expert > on the ARM part of this than me though. > Acked-by: Ian Rogers <irogers@google.com> > Thanks Ian!