Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp8295518rwd; Tue, 20 Jun 2023 13:04:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6/a9pPKz9eNgbxgiid4aZvY3AtfFV8sC0VJWw0gewgtCUpjK8jXf/StNRb0xly87DYIANP X-Received: by 2002:a17:90a:898c:b0:256:cf39:afce with SMTP id v12-20020a17090a898c00b00256cf39afcemr8130167pjn.43.1687291447241; Tue, 20 Jun 2023 13:04:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687291447; cv=none; d=google.com; s=arc-20160816; b=xL7ODY6ujfvnkRkktu+dFhd+OimtiaU0p3DzaoNzWTM9fJRf2oV5Lz81pT32JeiPdE CRD2oFC55QfQUFZemwVsYgCg13cNGKBWwNWQvst8pP3W8fOdN4nrgbMi8pQNfWNlfbWN mSlAdaM4qzLb3YjbzLX916ugzTEBrJw548kA8pOQUYAgWOFcOg+pDxWMS9gN5/5N/vp6 FfcEL792tTuiRujt3ThRD5WEebzKbjKwOx5eCS3A9rZ61Dy99feO43Ig+xpOKv1a8PaT E0/sNXTmL9/Np41gozxTiRkzbLdHBRmiEOpFqSilRuQiJqX6rLxM/Oe9CFzLWkjVBm/H svzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=J7n4pyObj3/nAA4zDo4hbsPUm0ALSgvSOQQigAF94Js=; b=Iu4U/0CQSH+eyuaC59Zrkydxlv+Tfbf/QdJuftGV8uvFF+zYoqmmLK1ViuAVpjxXq1 SzecA8GQTQh8gCvB7VDXyB1p0RICcw6UxKJEDiPSiESSPx0S0/7Vu+OWwj8sp/7KpIZQ H4dYfkgNzZEd2xL3lzUXTOhTmVR9sl2vduMs71cvGFhI3WnxoEtnazez+cVSntJd8qEh PXBANe1ub86kshCv9wYSzIFH9IXHcIxq6FDQjFHSju2oLx0glSGolBL4re932ftaGO+B j11n2aFmXp0LY88hiZ8I29RHT2GWxt7ETgIMsHnurNcuH1GGfX6yZbBE02xgPbEQooGY m2KA== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m12-20020a17090a5a4c00b00250ab2f31besi2720915pji.71.2023.06.20.13.03.41; Tue, 20 Jun 2023 13:04:07 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229595AbjFTTE5 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 20 Jun 2023 15:04:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230344AbjFTTEp (ORCPT ); Tue, 20 Jun 2023 15:04:45 -0400 Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BB0494; Tue, 20 Jun 2023 12:04:44 -0700 (PDT) Received: by mail-io1-f52.google.com with SMTP id ca18e2360f4ac-77e364a9a87so146973239f.3; Tue, 20 Jun 2023 12:04:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687287883; x=1689879883; h=content-transfer-encoding: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=qRkodGX0aqajT2WrVBIl/TXSiJnu1TTBK12nUg6B4M4=; b=jVyGD6Ue5vV8/LOpz4SbS/AwB4gf0VIqOOug5o5GXqm+eBvuhz6IkDMGKsMrQSe2Kh 8fuIVD79R3xBCghr+BXioEzlZVltUINJ8x+T0sjPY/xqev3M5jI318pFtO3pf+T+m5Ui JsEqxeDX6BBbLAU08XKVGUftAl1x82XC9T4gjMJyIB0IZJcuNbJi4FeXt1vsBhIYEvQe 6wijGwA86YAgDqKjKg8tiqziWkG2/yNP0DKTGzlLucihqfUu9LKREPcg3PLoO8G/biPs +mtqMKLuVeCRB+TlQL3XVhiCSNhmlGY3Uoo+SXCWVCaWaSQ1toP4yIDsCwCdVMQvYfgq WkDA== X-Gm-Message-State: AC+VfDy4vW/+W0j1JDKOP0t1ySDj4+A2uaCcaL1xMSHUCbxkLQGw0vti mnYpkNZ8B1l7DL77rV4pQGBvh7kT0eoaTq7wIAA= X-Received: by 2002:a6b:f102:0:b0:763:b459:a701 with SMTP id e2-20020a6bf102000000b00763b459a701mr14493358iog.1.1687287883261; Tue, 20 Jun 2023 12:04:43 -0700 (PDT) MIME-Version: 1.0 References: <1687245156-61215-1-git-send-email-renyu.zj@linux.alibaba.com> In-Reply-To: <1687245156-61215-1-git-send-email-renyu.zj@linux.alibaba.com> From: Namhyung Kim Date: Tue, 20 Jun 2023 12:04:31 -0700 Message-ID: Subject: Re: [PATCH v4 0/4] Add JSON metrics for Yitian710 DDR To: Jing Zhang Cc: Will Deacon , Mark Rutland , Jonathan Corbet , John Garry , Shuai Xue , Ian Rogers , Robin Murphy , James Clark , Mike Leach , Leo Yan , Ilkka Koskinen , Alexander Shishkin , Jiri Olsa , Adrian Hunter , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-doc@vger.kernel.org, Zhuo Song Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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 Hello, On Tue, Jun 20, 2023 at 12:17 AM Jing Zhang wrote: > > Hi all, > > I add an identifier sysfs file for the yitian710 SoC DDR 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 yitian710 SoC DDR > metrics and events alias. > > Change since v3: > - Split the CMN and ali_drw patches. This patchset only contains > ali_drw PMU related patches. The CMN metric related patches will > be in another patchset. > - Link: https://lore.kernel.org/all/1685438374-33287-1-git-send-email-renyu.zj@linux.alibaba.com/ > > $perf list: > ... > ali_drw: > chi_rxdat > [A packet at CHI RXDAT interface (write data). Unit: ali_drw] > chi_rxrsp > [A packet at CHI RXRSP interface. Unit: ali_drw] > chi_txdat > [A packet at CHI TXDAT interface (read data). Unit: ali_drw] > chi_txreq > [A packet at CHI TXREQ interface (request). Unit: ali_drw] > cycle > [The ddr cycle. Unit: ali_drw] > ... > ali_drw: > ddr_read_bandwidth.all > [The ddr read bandwidth(MB/s). Unit: ali_drw ] > ddr_write_bandwidth.all > [The ddr write bandwidth(MB/s). 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 (4): > 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 > docs: perf: Update metric usage for Alibaba's T-Head PMU driver So patch 1 is for the kernel, and patch 2-4 depend on it, right? I'm curious why the first patch is needed, presumably the PMU should have 'ali_drw' in the name already. Do we use substring match for the compat name in the JSON metric? Thanks, Namhyung > > Documentation/admin-guide/perf/alibaba_pmu.rst | 5 + > drivers/perf/alibaba_uncore_drw_pmu.c | 27 ++ > .../arm64/freescale/yitian710/sys/ali_drw.json | 373 +++++++++++++++++++++ > .../arm64/freescale/yitian710/sys/metrics.json | 20 ++ > tools/perf/pmu-events/jevents.py | 1 + > 5 files changed, 426 insertions(+) > 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 >