From patchwork Sun Jul 23 08:21:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 13323110 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 899E7C001DE for ; Sun, 23 Jul 2023 08:23:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=qmjXDR/lhVGYpYOmLqtWJ5pR7wN+CmJRXi/qUCUtruc=; b=zeM+NJyo/jc/iJ lMo/UdN4VLJ2HzQdmM9b8GsrXwJGds1O4P2lbDv1LZrcoxEqtLCDvfEUmdD+i/SWMHX9IPHtDsAph 9Oj+/P46g2q2V5ZacEqHl3hONjUkmoYTLHo9lS6PbUIOVI3xbPo57j1af1sGJKeb5IZpp6Hg05GSQ k4RBTDr1AZa+0QffPwBmnDU3VGAox7fIRg7C4iwWullJqlW0o+Ivi0Z8DLnjqUv4Uf90daFnFXyMb Hg9MDEdF7Uw5Eq2kG5M1dIsZNOUiHnYlNcygOGTEPieGmADfV3TsEejtRZVawh4Tmq7my5Vsggs3L k9blYL2eTad1sJDE3ZKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qNUMg-000a6Z-0Y; Sun, 23 Jul 2023 08:22:54 +0000 Received: from out30-98.freemail.mail.aliyun.com ([115.124.30.98]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qNUMO-000a0E-0B for linux-arm-kernel@lists.infradead.org; Sun, 23 Jul 2023 08:22:40 +0000 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=20;SR=0;TI=SMTPD_---0Vnzn8Ns_1690100515; Received: from srmbuffer011165236051.sqa.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0Vnzn8Ns_1690100515) by smtp.aliyun-inc.com; Sun, 23 Jul 2023 16:22:22 +0800 From: Jing Zhang To: John Garry , Ian Rogers Cc: Will Deacon , Mark Rutland , Robin Murphy , James Clark , Mike Leach , Leo Yan , 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, linux-doc@vger.kernel.org, Zhuo Song , Jing Zhang , Shuai Xue Subject: [PATCH v4 0/4] Add metric for Arm CMN Date: Sun, 23 Jul 2023 16:21:49 +0800 Message-Id: <1690100513-61165-1-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230723_012237_180789_D11D0A31 X-CRM114-Status: GOOD ( 10.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi all, This patch set adds event aliases and metrics for Arm CMN, and expands Compat's ability to match multiple identifiers and expands event fields in order to achieve the above capabilities. If it is no longer necessary to declare the "Compat" or "Unit" value when the metric is described by event aliases, I will delete "Compat" and "Unit" in the metric, but keep them for now. Changes since v3: - Split the arm CMN and ali_drw PMU patches compare to v3. ali_drw PMU related patches are in another patchset. - "Compat" supports matching multiple identifiers. - Support more event filed. - Add alias for part of Arm CMN PMU. - Fix some bug for CMN metric description. - Link: https://lore.kernel.org/all/1685438374-33287-1-git-send-email-renyu.zj@linux.alibaba.com/ Jing Zhang (4): perf metric: Event "Compat" value supports matching multiple identifiers perf jevents: Support more event fields perf vendor events: Add alias for Arm CMN PMU events. perf vendor events: Add metrics for Arm CMN .../pmu-events/arch/arm64/arm/cmn/sys/cmn.json | 266 +++++++++++++++++++++ .../pmu-events/arch/arm64/arm/cmn/sys/metric.json | 74 ++++++ tools/perf/pmu-events/jevents.py | 23 +- tools/perf/util/metricgroup.c | 27 ++- 4 files changed, 381 insertions(+), 9 deletions(-) create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cmn/sys/cmn.json create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metric.json