Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp569368iog; Fri, 24 Jun 2022 09:23:36 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tgOAjOoUAL7YlkJas2QyCodgJblQKR5R7ATd7YAKm85lzHuK+IWdDiMms5xiyYP44GjyQu X-Received: by 2002:a05:6a00:1a08:b0:510:a1db:1a91 with SMTP id g8-20020a056a001a0800b00510a1db1a91mr46648086pfv.69.1656087816024; Fri, 24 Jun 2022 09:23:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656087816; cv=none; d=google.com; s=arc-20160816; b=gJG6Vs57T9d+EEudLZ+620Yj+/jCjM+rKKvuzIhlHjr6VNbRm60v4XiVkXfP7/rpcg TLXSo/hqI4E42Z0GtdmHMKNi8JYmgwQHuBRhFkzIZPSQ6tMYCXPi3AreJzvwfOMDEUNz v4f39WP5SXDn7/e8uplCzpsY/EcfZL1IcXWY/kxsIi4aD9uw7+gMNmmcBzMmRhbHuczN QcQ8Km0TfIMxdnaCPer0bvQWdWGCGiqS19OUVK4E7stbPpBquqSfSGOgqHA9SG6ZUDwh 2w2wUFR4+Os3Ki0dnIXECckKSxShdAsq01U+UUgnxOMpSiJq6rZZbZKCsxqjNsgFkxru 5H+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=abAFNI17TtevmvwX9RIhVhlH0z4SjFXAqbUQQLt25Yw=; b=qIvwfc8TtaFjbYYFaatUQ5aTuuua3lnLvVFWaHupPQRAfcam4Vs2RipL9wRL/dQtLR R2vGwu4CnBouAqTu82Z/wna9slf9cIWdpvFs2KzTe5HjVeWaq38+tMR6+pIFLqjzeNnI 7oZxyzBMLtxPzwXlnNgjjDffuQzxsB1qrh58+ZaMocAP1amntj/eL1C3gbdEonDqFUOh NeyDM2lo5RV9BdfrYF/2H9VUfZ0OtEiuUVgcE1IWr8TjFuKCV+CYdx/8CIvBi2qmfNuz DvAUgW1izi0Dx57c+ENB6UmVe0QN47EMBh+tQ9XHuKpnbLAnMVyiSe0DHqVYPaiGc6Pk liwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=iLGXD1rC; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w17-20020a1709029a9100b00163fbb1f1fasi3562771plp.252.2022.06.24.09.23.17; Fri, 24 Jun 2022 09:23:36 -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; dkim=pass header.i=@maquefel.me header.s=mail header.b=iLGXD1rC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230177AbiFXQBr (ORCPT + 99 others); Fri, 24 Jun 2022 12:01:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbiFXQBn (ORCPT ); Fri, 24 Jun 2022 12:01:43 -0400 Received: from forward501p.mail.yandex.net (forward501p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9301B52534 for ; Fri, 24 Jun 2022 09:01:41 -0700 (PDT) Received: from myt5-d8fb82618a34.qloud-c.yandex.net (myt5-d8fb82618a34.qloud-c.yandex.net [IPv6:2a02:6b8:c12:59a3:0:640:d8fb:8261]) by forward501p.mail.yandex.net (Yandex) with ESMTP id B2D0B6215D67; Fri, 24 Jun 2022 19:01:36 +0300 (MSK) Received: from myt5-ca5ec8faf378.qloud-c.yandex.net (myt5-ca5ec8faf378.qloud-c.yandex.net [2a02:6b8:c12:2514:0:640:ca5e:c8fa]) by myt5-d8fb82618a34.qloud-c.yandex.net (mxback/Yandex) with ESMTP id cyUyyZV0wd-1afeYLWn; Fri, 24 Jun 2022 19:01:36 +0300 X-Yandex-Fwd: 2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1656086496; bh=abAFNI17TtevmvwX9RIhVhlH0z4SjFXAqbUQQLt25Yw=; h=In-Reply-To:References:Date:Subject:Cc:To:From:Message-Id; b=iLGXD1rC/AY6NKP7zBvtime9CVxW1/ZTQblFSr7nQbojY7tklxefLb/vqLudWfxHP FH93mkv2rQIX2iPBgUWD6YzBoUmZ1EdCadbYEHx8hltDilu+KmZJGJVEHp5qhxL4ki BUoiCtHlvwF+KHY3tBi3Aqd1lIMrFO7BEIW2O5S8= Authentication-Results: myt5-d8fb82618a34.qloud-c.yandex.net; dkim=pass header.i=@maquefel.me Received: by myt5-ca5ec8faf378.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id iVUkuL8Azf-1ZMKvOse; Fri, 24 Jun 2022 19:01:35 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) From: Nikita Shubin To: Atish Patra , Anup Patel Cc: =?UTF-8?q?Jo=C3=A3o=20M=C3=A1rio=20Domingos?= , linux@yadro.com, Nikita Shubin , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v4 3/5] perf arch events: riscv arch std event files Date: Fri, 24 Jun 2022 19:00:53 +0300 Message-Id: <20220624160117.3206-4-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220624160117.3206-1-nikita.shubin@maquefel.me> References: <20220624160117.3206-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Nikita Shubin cycles, time and instret counters are defined by RISC-V privileged spec and they should be available on any RISC-V implementation, epose them to arch std event files, so they can be reused by particular PMU bindings. Derived-from-code-by: João Mário Domingos Signed-off-by: Nikita Shubin --- .../pmu-events/arch/riscv/riscv-generic.json | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tools/perf/pmu-events/arch/riscv/riscv-generic.json diff --git a/tools/perf/pmu-events/arch/riscv/riscv-generic.json b/tools/perf/pmu-events/arch/riscv/riscv-generic.json new file mode 100644 index 000000000000..a7ffbe87a0f7 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/riscv-generic.json @@ -0,0 +1,20 @@ +[ + { + "PublicDescription": "CPU Cycles", + "EventCode": "0x00", + "EventName": "riscv_cycles", + "BriefDescription": "CPU cycles RISC-V generic counter" + }, + { + "PublicDescription": "CPU Time", + "EventCode": "0x01", + "EventName": "riscv_time", + "BriefDescription": "CPU time RISC-V generic counter" + }, + { + "PublicDescription": "CPU Instructions", + "EventCode": "0x02", + "EventName": "riscv_instret", + "BriefDescription": "CPU retired instructions RISC-V generic counter" + } +] -- 2.35.1