Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1766656iof; Tue, 7 Jun 2022 11:03:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxO00CewY/tjwMKhusrb+wrLf86kZuKqRS1L3TWeEWu0KfZJM82SZQRTgckT1863Zhnv+VR X-Received: by 2002:a17:90b:388f:b0:1e8:5df5:b2a3 with SMTP id mu15-20020a17090b388f00b001e85df5b2a3mr19370449pjb.70.1654625011403; Tue, 07 Jun 2022 11:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654625011; cv=none; d=google.com; s=arc-20160816; b=tkKnvVlck1SY9kVE8Q0TK9nVSPS84c+nLziLhs9Vw3hea7Lxsp7MEsVzsoCJy8pzDd WNrdIxTdrHHSRZkwe1mr0MbI1lWpuxJoR/1Cpu56YhiIWh3+Mpl6RAYJ9YH0oCC7cVv+ CdSl6PRf2x9RO5HwvzKyh5M5rQSjiSpss97q3oxDmEopHOapH2Lo0nw9O7r6jrCYHZKv AmYio4s9e3hlTwqVOpc7Uws9w6d2ZCAFAAahCnE5xLLPzQl7SXIcs8vohv1fkkAKqupo qvcbqmR1CFFM7W3H6gHXWc63QXOOiZe8MoYKpXZk9SgLvesJwE+ryWegTQfOHjkwAGN8 JJhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=H5ZJSB+X5ZPk+u9IuwBsHvhkdVj5IngYfZMVK2pBn+Q=; b=NIPOgyVZLQ4wC8iXJlPIK8yf81f94zJTjrFmMK0glIBG+4DWbzTQEedgDVTfzbakV2 KQK87V8ksgWP+qxDOqqkyyg4fPKksf/g/eBZQ92dhUZIMYmRMtJUIGEVivWCKw9rf+LE 8+hrQ6Z9MoLYuZ3OQJ/MuHANl/07KmRePWhEWN9/q3oCrzPAe2L41cEcXiY5sMIQGuh8 5yFqviPYNbVoIXLcIn98K7LZ7IDNi7NJ0iXbezB+h3QDk7W4zC4ohvYHEzhMTJBRyolc 1jzubOFxlMw/sPnO5MDUOd6DRGvJMLgZhXvA0Lc86eaBR7Xd1coVbtHlK6p9aaJ6Haa7 XxHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@maquefel.me header.s=mail header.b=nYhgRjYg; 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 u18-20020a17090341d200b001587f099641si25164139ple.387.2022.06.07.11.03.17; Tue, 07 Jun 2022 11:03:31 -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=fail header.i=@maquefel.me header.s=mail header.b=nYhgRjYg; 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 S244655AbiFGNZh (ORCPT + 99 others); Tue, 7 Jun 2022 09:25:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244650AbiFGNZ2 (ORCPT ); Tue, 7 Jun 2022 09:25:28 -0400 X-Greylist: delayed 488 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 07 Jun 2022 06:25:25 PDT Received: from forward501o.mail.yandex.net (forward501o.mail.yandex.net [37.140.190.203]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C8C1BE164; Tue, 7 Jun 2022 06:25:25 -0700 (PDT) Received: from myt5-a76c7b0c543c.qloud-c.yandex.net (myt5-a76c7b0c543c.qloud-c.yandex.net [IPv6:2a02:6b8:c12:2908:0:640:a76c:7b0c]) by forward501o.mail.yandex.net (Yandex) with ESMTP id F3ED745C4C8B; Tue, 7 Jun 2022 16:17:06 +0300 (MSK) Received: from myt6-654ec0a0ab93.qloud-c.yandex.net (myt6-654ec0a0ab93.qloud-c.yandex.net [2a02:6b8:c12:1d80:0:640:654e:c0a0]) by myt5-a76c7b0c543c.qloud-c.yandex.net (mxback/Yandex) with ESMTP id 0JqJ9qHZUZ-H6fOeVsZ; Tue, 07 Jun 2022 16:17:06 +0300 X-Yandex-Fwd: 2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1654607826; bh=H5ZJSB+X5ZPk+u9IuwBsHvhkdVj5IngYfZMVK2pBn+Q=; h=In-Reply-To:References:Date:Subject:Cc:To:From:Message-Id; b=nYhgRjYg+zJOPmbF47oV3H7hZ0cLH7P5Uk6Ki6HcvRMzoaJb0SsL1tRVTCoW953Q6 yfG5q9/auzw8JMI3gNKAPFT+Rp/Zb4YWDXcPQkaRSI2h8d7QRw56mBlOg2TUpKWqkr 4YwbpAkC8jkQv7KTU6thzeGxEKvPmGsZsaAnSR2s= Authentication-Results: myt5-a76c7b0c543c.qloud-c.yandex.net; dkim=pass header.i=@maquefel.me Received: by myt6-654ec0a0ab93.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id sOXgg17Zrk-H5M4o90G; Tue, 07 Jun 2022 16:17:05 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) From: Nikita Shubin Cc: Genevieve Chan , =?UTF-8?q?Jo=C3=A3o=20M=C3=A1rio=20Domingos?= , 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 (open list), linux-perf-users@vger.kernel.org (open list:PERFORMANCE EVENTS SUBSYSTEM), linux-riscv@lists.infradead.org (open list:RISC-V ARCHITECTURE) Subject: [PATCH v3 3/4] RISC-V: Added generic pmu-events mapfile Date: Tue, 7 Jun 2022 16:16:46 +0300 Message-Id: <20220607131648.29439-4-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220607131648.29439-1-nikita.shubin@maquefel.me> References: <20220607131648.29439-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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: João Mário Domingos The pmu-events now supports custom events for RISC-V, plus the cycle, time and instret events were defined. Signed-off-by: João Mário Domingos Tested-by: Nikita Shubin --- tools/perf/pmu-events/arch/riscv/mapfile.csv | 14 +++++++++++++ .../pmu-events/arch/riscv/riscv-generic.json | 20 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 tools/perf/pmu-events/arch/riscv/mapfile.csv create mode 100644 tools/perf/pmu-events/arch/riscv/riscv-generic.json diff --git a/tools/perf/pmu-events/arch/riscv/mapfile.csv b/tools/perf/pmu-events/arch/riscv/mapfile.csv new file mode 100644 index 000000000000..4f2aa199d9cb --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/mapfile.csv @@ -0,0 +1,14 @@ +# Format: +# MIDR,Version,JSON/file/pathname,Type +# +# where +# MIDR Processor version +# Variant[23:20] and Revision [3:0] should be zero. +# Version could be used to track version of JSON file +# but currently unused. +# JSON/file/pathname is the path to JSON file, relative +# to tools/perf/pmu-events/arch/riscv/. +# Type is core, uncore etc +# +# +#Family-model,Version,Filename,EventType 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..013e50efad99 --- /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" + } +] \ No newline at end of file -- 2.35.1