From patchwork Thu Feb 13 01:21:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13974108 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 7380BC021A6 for ; Thu, 13 Feb 2025 22:03:55 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=AQSULCY3WV78+DF6RslfY3lDaTfapBeKzAYjr1S4dPs=; b=mKg4JyUhxOLmdT Po4r4AmXY8dyTnvLkvh7X1T2mEAp/YYtCLJ3aq1W3Th9TNH6NOvJ+Viq1rM7EmfzekUfGidU3cJW9 xqKvnlMs7YK1/RbRUhUq6MzX7stxtab15jrp0COyMUCoZln2ypLfdLhG7W8F6yXrZ+FMnGqk3H97a BzUpaqbIZbzwpxJbs0bgN4T4+B8vHkuv2ygrZwz5phdKd35McqlrZ2Pi8SMfSCwbwDAotJZJcFsJu nrGr/38dqWEs3tn+xPYp+iAaFaVGEUfXTjnVcUQKq5grEtqsULuON+WjOZXR6d3yqelGxSmCZIOpQ dL47x0hcwco1JnL1x/nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tihJE-0000000ClT6-40FR; Thu, 13 Feb 2025 22:03:48 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tihJC-0000000ClRE-1MyM for linux-riscv@lists.infradead.org; Thu, 13 Feb 2025 22:03:47 +0000 Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-2f9b91dff71so2070235a91.2 for ; Thu, 13 Feb 2025 14:03:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1739484225; x=1740089025; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sn7Sf/VJa7o2kQnvv17430q5LGkiKAmnPlLEbt0xnSg=; b=QqL5s4CDQWaQ4ZwSrLiCE5Rs1gLa2V+3/sOC9VJZEg5drahQGSm43szsb0wWW60HYU WW/1eIfVD6NLoChHfH915kedpAFNH/URWhLnfKDWlABoxNLNZYvCra+nMBoKPPb6sAf/ py6CW8ChJKdY33xiAWl7ZR0xT5TJApvT275Jh1TIu+jfCOR1qwMco3gCv2sZfsiI3Lhb gm6VFEKL6wkpEqdqoHVN3jlEMMhQyqgk6NnFie8FZEfbAt/kiJ7N7eoDBx3DwFfRt+KM xbe9TInqq+IQ7l4Ed76IgeCjwY36voXt5yDVudPvny2P6dRuv+Zev75pOMV0Qdv95k4I 45jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739484225; x=1740089025; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sn7Sf/VJa7o2kQnvv17430q5LGkiKAmnPlLEbt0xnSg=; b=eD+lQt6HN4Bf/rKj4Mtry0XIJosBBuuFlW1GNMQTO+1W2FUaUlYJ1n0C0vZlrYQBv7 vIxRdNAIWjV9izicBzBNw1PobiRSWFt0vfL4CrRaS96HqDxTuSbFe3rc4afQEd0dutV/ tHkjY6MacPuP9QPb9zZDqwvAc9w8IpQ2fbn4qsW8R7eZJQRZSuEKy2dUOpJ2/a40SHBq 9KOYJ29o7ZckYEE7yE3Wc5kOik0cIZfyRHpkggVz1WyL+a/kdV5taioa0a6Y+TaMs0Jk A0N8JEVLe198PPWTXQ8Pztyiq0yj1eXOVj2LaE5yxIDrTx+jNbNU8cRe0BFOZAmwveFL 0oUA== X-Forwarded-Encrypted: i=1; AJvYcCXeoc2uDkJ2iQHjlX85Z5Rj1pBvTQgG0HxlE2S+5wkPjdW0mdoxwZZOuTYdoGEo+IWS9y0obEuPac3tFw==@lists.infradead.org X-Gm-Message-State: AOJu0YzNxv+/6ZEsnMI7QzBEKXJ2q6tvbyn/fxPbSwL0YXjrGUhX1fbB 1YKCrC6fTDhwT1CHftknCgBsdbOotNg46KD2PIrNppQTyl9oQev4AvY8Jc8UnkM= X-Gm-Gg: ASbGncsTBR1ACEhvKFhHmknwDlJQKOvFVc4q2rDLeEgpAZkDnsAJ0zxDwz3LFn3DlSF eD/f2EBCfATQia/vCryJhLWgEacOnTdHif/ctAI00tggb457G2R2R8AiwNBaYjeRYma+dmzWCc9 GWyqiOFB2UJQiSnPnEjbSV2RMMZHoCmj9386oHsI0SIsd64o9JUax+OrHjNSmi3kbaauSdT3STE o+5yhXXtL9LXl5fs83CEHAjuFRB/ekg64cVvXyllZrE/Eij/4OCaXhNe2md3JtLR0OG9jCAH/Bk vmweviy0BWWYnNQmnuhkIaxbruBXMFABDd8yXg== X-Google-Smtp-Source: AGHT+IHkFJ+qjdPn6uu0QPcmGwTebP9L3ITV/fNakdUXm6n9V5utSpWvIQRkdMaseOUVz3BmpGbQ1g== X-Received: by 2002:a05:6a00:2ea3:b0:730:9204:f0c6 with SMTP id d2e1a72fcca58-7322c4310b4mr11699224b3a.16.1739484225285; Thu, 13 Feb 2025 14:03:45 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7324273e438sm1847491b3a.94.2025.02.13.14.03.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 14:03:45 -0800 (PST) From: Samuel Holland To: Arnaldo Carvalho de Melo , Ian Rogers , Palmer Dabbelt , linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Mark Rutland , Adrian Hunter , Alexander Shishkin , linux-kernel@vger.kernel.org, Jiri Olsa , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Arnaldo Carvalho de Melo , Samuel Holland Subject: [RESEND PATCH 1/7] perf vendor events riscv: Rename U74 to Bullet Date: Wed, 12 Feb 2025 17:21:34 -0800 Message-ID: <20250213220341.3215660-2-samuel.holland@sifive.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250213220341.3215660-1-samuel.holland@sifive.com> References: <20250213220341.3215660-1-samuel.holland@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250213_140346_370572_9E8B825B X-CRM114-Status: UNSURE ( 8.45 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org This set of PMU event descriptions applies not only to the SiFive U74 core configuration, but also to other SiFive cores that implement the Bullet microarchitecture (such as U64, P270, and X280). Rename the directory to be more generic. Signed-off-by: Samuel Holland --- tools/perf/pmu-events/arch/riscv/mapfile.csv | 2 +- .../pmu-events/arch/riscv/sifive/{u74 => bullet}/firmware.json | 0 .../sifive/{u74/instructions.json => bullet/instruction.json} | 0 .../pmu-events/arch/riscv/sifive/{u74 => bullet}/memory.json | 0 .../pmu-events/arch/riscv/sifive/{u74 => bullet}/microarch.json | 0 5 files changed, 1 insertion(+), 1 deletion(-) rename tools/perf/pmu-events/arch/riscv/sifive/{u74 => bullet}/firmware.json (100%) rename tools/perf/pmu-events/arch/riscv/sifive/{u74/instructions.json => bullet/instruction.json} (100%) rename tools/perf/pmu-events/arch/riscv/sifive/{u74 => bullet}/memory.json (100%) rename tools/perf/pmu-events/arch/riscv/sifive/{u74 => bullet}/microarch.json (100%) diff --git a/tools/perf/pmu-events/arch/riscv/mapfile.csv b/tools/perf/pmu-events/arch/riscv/mapfile.csv index 3d3a809a5446..521f416b0006 100644 --- a/tools/perf/pmu-events/arch/riscv/mapfile.csv +++ b/tools/perf/pmu-events/arch/riscv/mapfile.csv @@ -14,7 +14,7 @@ # # #MVENDORID-MARCHID-MIMPID,Version,Filename,EventType -0x489-0x8000000000000007-0x[[:xdigit:]]+,v1,sifive/u74,core +0x489-0x8000000000000007-0x[[:xdigit:]]+,v1,sifive/bullet,core 0x5b7-0x0-0x0,v1,thead/c900-legacy,core 0x67e-0x80000000db0000[89]0-0x[[:xdigit:]]+,v1,starfive/dubhe-80,core 0x31e-0x8000000000008a45-0x[[:xdigit:]]+,v1,andes/ax45,core diff --git a/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/firmware.json similarity index 100% rename from tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json rename to tools/perf/pmu-events/arch/riscv/sifive/bullet/firmware.json diff --git a/tools/perf/pmu-events/arch/riscv/sifive/u74/instructions.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json similarity index 100% rename from tools/perf/pmu-events/arch/riscv/sifive/u74/instructions.json rename to tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json diff --git a/tools/perf/pmu-events/arch/riscv/sifive/u74/memory.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json similarity index 100% rename from tools/perf/pmu-events/arch/riscv/sifive/u74/memory.json rename to tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json diff --git a/tools/perf/pmu-events/arch/riscv/sifive/u74/microarch.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json similarity index 100% rename from tools/perf/pmu-events/arch/riscv/sifive/u74/microarch.json rename to tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json From patchwork Thu Feb 13 01:21:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13974114 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 04ED8C021A4 for ; Thu, 13 Feb 2025 22:04:03 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=zrk4CECzZIIxT4MQEexQmgQF2tcx2KJttOavPjCa0oU=; b=Izc6J6G2IgZ0Sm ZvFD6ul8esD4TnH+yO+uWdkh7AcwznKbB9iWxnV5Kb4BJC985maX/yJv32Q6iuxIA8/iwwVkFKclM futi+kOVbi2agcoWe/r4CiKghNMwTlMpExUc7ZVgZm3ibtnjhnTZKoT3SRIH56KR8CDBKJ6r/+m6O LyLbMhIF1Yxo+QwBbdmBLhNsJw4JiWTfpCGetF4fFMaofL7R10cKpMBhCaTfMoocrM9+1S/dArUC9 cwqgnmhPwrsn2kVVLK1yBrU6Bupthy48/PRsWiTSCf5rEDyqzv0K2imXf37A9EVbZePK67UvqIxrE 84vgh2gpJwMEYmk5KcGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tihJO-0000000Clc7-1EF7; Thu, 13 Feb 2025 22:03:58 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tihJN-0000000Clap-1X6F for linux-riscv@bombadil.infradead.org; Thu, 13 Feb 2025 22:03:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=/ujrNz6bFEjXMZWyeD7xO+6PAHSEy846AW7WXFdUvFc=; b=UPwvF7qCVOHWLtPiIeCkrCWoTB GiiMW9VtYw7DZoKz1RE9op7/MzlLDs8rkVb4ShpDmjDlakm3zueTujMx8bBhRJP8xhaeoypH0wAiY GsOC16fuYgaDpxJo0xRbWLQ3+ZJPxYBZZ8o233jW6LEpbyk8BVdJdI+ZXiWc51Rly47MgACvQ1HtJ lxs7NVgI9cj3pHm+urpGT5odWvJQxEva/ONbZcbidloDlaElhpk3FsMZtd0nDikvWJp76P56hEbDX hmavX01lJFoE4WuuCUaKN5e/YXkkyh2rosgh7RfS2DeNhpQBf23kSGIzBueS4nQxEJ2q1DaBl8YZh sOMIi1TQ==; Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tihJG-000000016ys-3F3K for linux-riscv@lists.infradead.org; Thu, 13 Feb 2025 22:03:54 +0000 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-220c8cf98bbso27720185ad.1 for ; Thu, 13 Feb 2025 14:03:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1739484226; x=1740089026; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/ujrNz6bFEjXMZWyeD7xO+6PAHSEy846AW7WXFdUvFc=; b=gIYroRZgLysVSvMiWNPxlODngrVpLJx5iQUE2QjWkxXS5NvjquSk671xXalPxjPvbs sY+1MO3hcec8mkNI6UXuUVyuiDT48kKVt7+It5l0tumRrVl1mZbIXaHiANF/qUAo+kTO xFeAAIeNeg6NkUoD50AbzkSNOy8xd0vP9p8tQ0PvE1gY99lSSpB/FaDV2KUXqkv1ccAk 9WN8HDebDxfioztUDwFLoozdByFqAmdiKJTfGHiKdU9/YwhPoaCdQ3kx1K4/RlcHks6g sftYow3WVSt+BnMgjUHtBByqXH3uKUr3vSs7cQoOLRAckFEbmzd8NkQd3NTCInNbLBgd /Syg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739484226; x=1740089026; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/ujrNz6bFEjXMZWyeD7xO+6PAHSEy846AW7WXFdUvFc=; b=a7+0DFvW8U6uZixRMerJHwe7FNNAlMd/Blugj/VXiMNAwYT0VuAwFDN+9mDW+RvjWM FVHk4MKJ0knZLSnZrhVZhuSuG8lm99cR+aL7WjaYDkjEucLM7L8cxzC5qvBJnRtFUhgi ywa/jnhngwqdbIJWM1R5enX4+CXEwjQUANNPHIBxtJUTUumj2A61vKcWSxHMbNHwlfXG XhTj3PE20TWxerxcBTdgV7Pufslo3C1PnK4lkrKMg6VBBefuh52KoI6EPuFHvDeFn+Z8 YHOIIMmHYWcw6/u/KHw4Zv8+S69wl3bE9Id9usQzla4MNAC5FmyzA/kSITD4OHjK3A6c 71ig== X-Forwarded-Encrypted: i=1; AJvYcCWKtzj3zokARuBBUDwG+1Ui6JzCNOSN5oFTtfCAN+tvqauvHeHGzXUjVQXtdtXvWvfgUNmL+7KjXP2+zA==@lists.infradead.org X-Gm-Message-State: AOJu0YyGnalLQQ0qBh298m+nOXCNL2E8sCZLyUyY4xCCt5NL9h8w1R+D DyQAvZx1XPilAjNeBNJkJGwe4IBSW0KzPtrlu6HXWuTedJ/FIvphEKHFTr8OpMk= X-Gm-Gg: ASbGnctDGqOdvadrZ+pmk9HXT+YV4IJLA/le80vltF+WQBRFPuaiquZmu62sUmrZXZW O4zV0YbDrASgLJSMaQQxNCx3JWtLNzf7m6A308Hf9jAHqPJ1Mdw5Ku9D+EXb3vsv3GsTsUx+SRY XjBU1w8KwNkduy2xHQ1SPaiyJB3BVjDTRRPVE1R3wCYQcudd9lp0JJzPseXW9kDRfKYaFHalfhj 9mgdWGYElnOLXBsgrjeG0kvbkDb155mPKwTYX0/FK/dh16PEAvL97z6Jgv+jaSkCmToloLhrc7Z HL5Aln0pEVcG3sUGMPzv+S/mYU0HgaU28CxeOQ== X-Google-Smtp-Source: AGHT+IEkWuYu6Mf+HWuIrNOvHWAQyQHQHIN4Af/iLEKahRrF/JeeptdD8j+MBLAWGFNetgsaZ+DGjg== X-Received: by 2002:a05:6a00:8006:b0:72a:9ddf:55ab with SMTP id d2e1a72fcca58-7322c38b08emr12659266b3a.10.1739484226610; Thu, 13 Feb 2025 14:03:46 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7324273e438sm1847491b3a.94.2025.02.13.14.03.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 14:03:46 -0800 (PST) From: Samuel Holland To: Arnaldo Carvalho de Melo , Ian Rogers , Palmer Dabbelt , linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Mark Rutland , Adrian Hunter , Alexander Shishkin , linux-kernel@vger.kernel.org, Jiri Olsa , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Arnaldo Carvalho de Melo , Samuel Holland Subject: [RESEND PATCH 2/7] perf vendor events riscv: Remove leading zeroes Date: Wed, 12 Feb 2025 17:21:35 -0800 Message-ID: <20250213220341.3215660-3-samuel.holland@sifive.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250213220341.3215660-1-samuel.holland@sifive.com> References: <20250213220341.3215660-1-samuel.holland@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250213_220352_445252_6E299A12 X-CRM114-Status: UNSURE ( 9.51 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The EventCode field (as stored in the mhpmeventN CSRs) is actually 56 bits wide, but there is no need to keep leading zeroes in the JSON files. Remove them to simplify review of the following change, which regenerates the files in a way that does not include leading zeroes. This change was performed automatically with `sed -i "s/0x0*/0x/"`. Signed-off-by: Samuel Holland --- .../arch/riscv/sifive/bullet/instruction.json | 32 +++++++++---------- .../arch/riscv/sifive/bullet/memory.json | 12 +++---- .../arch/riscv/sifive/bullet/microarch.json | 22 ++++++------- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json index 5eab718c9256..d5c370f70819 100644 --- a/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json @@ -1,82 +1,82 @@ [ { "EventName": "EXCEPTION_TAKEN", - "EventCode": "0x0000100", + "EventCode": "0x100", "BriefDescription": "Exception taken" }, { "EventName": "INTEGER_LOAD_RETIRED", - "EventCode": "0x0000200", + "EventCode": "0x200", "BriefDescription": "Integer load instruction retired" }, { "EventName": "INTEGER_STORE_RETIRED", - "EventCode": "0x0000400", + "EventCode": "0x400", "BriefDescription": "Integer store instruction retired" }, { "EventName": "ATOMIC_MEMORY_RETIRED", - "EventCode": "0x0000800", + "EventCode": "0x800", "BriefDescription": "Atomic memory operation retired" }, { "EventName": "SYSTEM_INSTRUCTION_RETIRED", - "EventCode": "0x0001000", + "EventCode": "0x1000", "BriefDescription": "System instruction retired" }, { "EventName": "INTEGER_ARITHMETIC_RETIRED", - "EventCode": "0x0002000", + "EventCode": "0x2000", "BriefDescription": "Integer arithmetic instruction retired" }, { "EventName": "CONDITIONAL_BRANCH_RETIRED", - "EventCode": "0x0004000", + "EventCode": "0x4000", "BriefDescription": "Conditional branch retired" }, { "EventName": "JAL_INSTRUCTION_RETIRED", - "EventCode": "0x0008000", + "EventCode": "0x8000", "BriefDescription": "JAL instruction retired" }, { "EventName": "JALR_INSTRUCTION_RETIRED", - "EventCode": "0x0010000", + "EventCode": "0x10000", "BriefDescription": "JALR instruction retired" }, { "EventName": "INTEGER_MULTIPLICATION_RETIRED", - "EventCode": "0x0020000", + "EventCode": "0x20000", "BriefDescription": "Integer multiplication instruction retired" }, { "EventName": "INTEGER_DIVISION_RETIRED", - "EventCode": "0x0040000", + "EventCode": "0x40000", "BriefDescription": "Integer division instruction retired" }, { "EventName": "FP_LOAD_RETIRED", - "EventCode": "0x0080000", + "EventCode": "0x80000", "BriefDescription": "Floating-point load instruction retired" }, { "EventName": "FP_STORE_RETIRED", - "EventCode": "0x0100000", + "EventCode": "0x100000", "BriefDescription": "Floating-point store instruction retired" }, { "EventName": "FP_ADDITION_RETIRED", - "EventCode": "0x0200000", + "EventCode": "0x200000", "BriefDescription": "Floating-point addition retired" }, { "EventName": "FP_MULTIPLICATION_RETIRED", - "EventCode": "0x0400000", + "EventCode": "0x400000", "BriefDescription": "Floating-point multiplication retired" }, { "EventName": "FP_FUSEDMADD_RETIRED", - "EventCode": "0x0800000", + "EventCode": "0x800000", "BriefDescription": "Floating-point fused multiply-add retired" }, { diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json index be1a46312ac3..ba3168f8a4cd 100644 --- a/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json @@ -1,32 +1,32 @@ [ { "EventName": "ICACHE_RETIRED", - "EventCode": "0x0000102", + "EventCode": "0x102", "BriefDescription": "Instruction cache miss" }, { "EventName": "DCACHE_MISS_MMIO_ACCESSES", - "EventCode": "0x0000202", + "EventCode": "0x202", "BriefDescription": "Data cache miss or memory-mapped I/O access" }, { "EventName": "DCACHE_WRITEBACK", - "EventCode": "0x0000402", + "EventCode": "0x402", "BriefDescription": "Data cache write-back" }, { "EventName": "INST_TLB_MISS", - "EventCode": "0x0000802", + "EventCode": "0x802", "BriefDescription": "Instruction TLB miss" }, { "EventName": "DATA_TLB_MISS", - "EventCode": "0x0001002", + "EventCode": "0x1002", "BriefDescription": "Data TLB miss" }, { "EventName": "UTLB_MISS", - "EventCode": "0x0002002", + "EventCode": "0x2002", "BriefDescription": "UTLB miss" } ] \ No newline at end of file diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json index 50ffa55418cb..8036e72fb0d4 100644 --- a/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json @@ -1,57 +1,57 @@ [ { "EventName": "ADDRESSGEN_INTERLOCK", - "EventCode": "0x0000101", + "EventCode": "0x101", "BriefDescription": "Address-generation interlock" }, { "EventName": "LONGLAT_INTERLOCK", - "EventCode": "0x0000201", + "EventCode": "0x201", "BriefDescription": "Long-latency interlock" }, { "EventName": "CSR_READ_INTERLOCK", - "EventCode": "0x0000401", + "EventCode": "0x401", "BriefDescription": "CSR read interlock" }, { "EventName": "ICACHE_ITIM_BUSY", - "EventCode": "0x0000801", + "EventCode": "0x801", "BriefDescription": "Instruction cache/ITIM busy" }, { "EventName": "DCACHE_DTIM_BUSY", - "EventCode": "0x0001001", + "EventCode": "0x1001", "BriefDescription": "Data cache/DTIM busy" }, { "EventName": "BRANCH_DIRECTION_MISPREDICTION", - "EventCode": "0x0002001", + "EventCode": "0x2001", "BriefDescription": "Branch direction misprediction" }, { "EventName": "BRANCH_TARGET_MISPREDICTION", - "EventCode": "0x0004001", + "EventCode": "0x4001", "BriefDescription": "Branch/jump target misprediction" }, { "EventName": "PIPE_FLUSH_CSR_WRITE", - "EventCode": "0x0008001", + "EventCode": "0x8001", "BriefDescription": "Pipeline flush from CSR write" }, { "EventName": "PIPE_FLUSH_OTHER_EVENT", - "EventCode": "0x0010001", + "EventCode": "0x10001", "BriefDescription": "Pipeline flush from other event" }, { "EventName": "INTEGER_MULTIPLICATION_INTERLOCK", - "EventCode": "0x0020001", + "EventCode": "0x20001", "BriefDescription": "Integer multiplication interlock" }, { "EventName": "FP_INTERLOCK", - "EventCode": "0x0040001", + "EventCode": "0x40001", "BriefDescription": "Floating-point interlock" } ] \ No newline at end of file From patchwork Thu Feb 13 01:21:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13974109 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 DAE2AC021A4 for ; Thu, 13 Feb 2025 22:03:56 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=zjiuD3FiGujzfbHhRMlB9cTye6w+hUMEALXE/FGFPws=; b=SdhhQ586ZmvpS+ V+1kctC0rZXI+A6038DBZ9pwu0sKhJeMptR8yskXjKfvGSbXkIkZcNBAwP2wrdeym0GTYljZnjKnu cMNfkt90+l/pOkFkpKIBg8Ah8LbPXZP5N8pX7S4hXv+URYLuYqhd2LQrywGg4HptMyDtcV5O3LujL 8gFinnM/uCegnEMti6vFBaxCJ0P/dFcQ9oyMPxJpqfZrgvdyFm64vgXq2to3tA4P6bIgPGi/uaIIX Xm20zw4Ibh72KSuN+FGh9m22Vawxv19etPEEHI1MYKnjOTZD4tAwiGt6HzhLezkAgO0Qq187AOOEh 4pAIQ9CVaqqS3zxwnpWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tihJH-0000000ClVj-38cO; Thu, 13 Feb 2025 22:03:51 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tihJF-0000000ClT0-0GH4 for linux-riscv@lists.infradead.org; Thu, 13 Feb 2025 22:03:50 +0000 Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-2fc292b3570so701960a91.1 for ; Thu, 13 Feb 2025 14:03:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1739484228; x=1740089028; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xeNVoNYpyWmAYcTXSWgq1Wck1u4KyPy10iVrXroX1W0=; b=b7bzXSBQphF508d0r9CeZn6XxFmHG60qxiuTP+cT8FWPFtocgezT2cjgaccaMvRVkw NkY5r33zPsYylN9kAqTq4REwZqEXrivKr5nqNpY6opK7FlNP0A3nUPkGrZVJpceZ7ezW noRr136kpLkjZ/bPlVoUQTx6xotdW5seSN33TpvKFjI3iV1XUSOvbtimzTQs1KYhOW+q C/3WcKpKXiKFMJWEbOI7mJrTymta/EeG/w7uegczfiqBKqcGCAfvHoHsjL7hZ4JLS5zt aPqmmW/1kERU4LFFuviahxbThqT65afV1PK9FvsnQoIlfxQ1THbGiPZSi2s+z496yoWs D24g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739484228; x=1740089028; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xeNVoNYpyWmAYcTXSWgq1Wck1u4KyPy10iVrXroX1W0=; b=MoedTD/broyhfkc7kdiVwFe8d/qhTy4XfsehbybBEkO0U0KU3mQa5GGP4CJXJB//30 vhN4paXMPERU0qyRylbokYcCQYhZZlsQrWqQjLu1sPadg/mvZmjPXPAClV9Ri+8UfRIh VH4nVUoYrmco0G6gIWde7t367kg1JnCYiWN0gpBjKxHuoC6GlPKW9ADLTfxKw6KyVx4m GrGmkWFpO3BLE7czIZrele9K878rclFWiYK3iOHsHJEi7I92NEQuze7BvRYEOUoWyh3D PtZBDgvvKacJ6YYe0KibEDjWizWWHcBYpdarVXXt1Ll7fGSPCuniZ0BuRGP+AQjEXI0x Cm0Q== X-Forwarded-Encrypted: i=1; AJvYcCUDZ0KXLycLr0QSboC8b2IlgCce/01fcripfKhNupmSkonJDCZ0osoI/Nov9kUf1OUMRsneVUMHScRaKw==@lists.infradead.org X-Gm-Message-State: AOJu0Yw+EDKiaIqNwROpFVgrTMpHfR4bEf5O0uE71IqS5LxXvrT4+29+ bvuAfLYudsPI6y5nS436tPNxlX/l+Ltcf07RSzYyxTALuKRe8vDc1W5hh3GZwsU= X-Gm-Gg: ASbGncvawIhRzSaCcmG0OiMax4rOUc2ZWK3S4SgvLPwLdOpUzpYJLjXasu2zy7IvMKO nTvsgHpfL43nG5TVLamjDvmGhCdCnoAeM9zSGwHxKrd9Bnd9MHoEFS4yX3/rv7iNBnwKrsZTlyz mMTIacQLs2pjTv8BlfPsNk9itlrxA/7ChM3dTJ/5yykfeiGa9Vxvq2pcN6l52nG90qjr6rJmqcR 0ZpAOaNjj+/SEq+M6gxVnsNWJ1Ga1Bjts7y3b2JcW00QNxQYWORgrtn5vRLAtqVXF9P/Nz0HilM RAssjVsC/xXpYc3SuIYxg4qt2WhFeqxOpEstPQ== X-Google-Smtp-Source: AGHT+IHnuVlNMFPAoL0Y+6j/6cimg69Ufm3HsDZD07eMDnYdRVpW30E9B1x9uqsr06kWIo67J880Og== X-Received: by 2002:a05:6a00:aa8e:b0:725:ea30:aafc with SMTP id d2e1a72fcca58-7323c1059f6mr6695686b3a.5.1739484227953; Thu, 13 Feb 2025 14:03:47 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7324273e438sm1847491b3a.94.2025.02.13.14.03.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 14:03:47 -0800 (PST) From: Samuel Holland To: Arnaldo Carvalho de Melo , Ian Rogers , Palmer Dabbelt , linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Mark Rutland , Adrian Hunter , Alexander Shishkin , linux-kernel@vger.kernel.org, Jiri Olsa , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Arnaldo Carvalho de Melo , Eric Lin , Samuel Holland Subject: [RESEND PATCH 3/7] perf vendor events riscv: Update SiFive Bullet events Date: Wed, 12 Feb 2025 17:21:36 -0800 Message-ID: <20250213220341.3215660-4-samuel.holland@sifive.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250213220341.3215660-1-samuel.holland@sifive.com> References: <20250213220341.3215660-1-samuel.holland@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250213_140349_119487_450E96DC X-CRM114-Status: GOOD ( 10.88 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Eric Lin Regenerate the event lists from the original hardware description. This makes them consistent with the event lists for newer versions of the hardware, allowing most files to be reused across hardware versions. Signed-off-by: Eric Lin Co-developed-by: Samuel Holland Signed-off-by: Samuel Holland --- .../arch/riscv/sifive/bullet/instruction.json | 44 +++++++++---------- .../arch/riscv/sifive/bullet/memory.json | 24 +++++----- .../arch/riscv/sifive/bullet/microarch.json | 38 ++++++++-------- 3 files changed, 53 insertions(+), 53 deletions(-) diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json index d5c370f70819..284e4c1566e0 100644 --- a/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json @@ -2,91 +2,91 @@ { "EventName": "EXCEPTION_TAKEN", "EventCode": "0x100", - "BriefDescription": "Exception taken" + "BriefDescription": "Counts exceptions taken" }, { "EventName": "INTEGER_LOAD_RETIRED", "EventCode": "0x200", - "BriefDescription": "Integer load instruction retired" + "BriefDescription": "Counts integer load instructions retired" }, { "EventName": "INTEGER_STORE_RETIRED", "EventCode": "0x400", - "BriefDescription": "Integer store instruction retired" + "BriefDescription": "Counts integer store instructions retired" }, { "EventName": "ATOMIC_MEMORY_RETIRED", "EventCode": "0x800", - "BriefDescription": "Atomic memory operation retired" + "BriefDescription": "Counts atomic memory instructions retired" }, { "EventName": "SYSTEM_INSTRUCTION_RETIRED", "EventCode": "0x1000", - "BriefDescription": "System instruction retired" + "BriefDescription": "Counts system instructions retired (CSR, WFI, MRET, etc.)" }, { "EventName": "INTEGER_ARITHMETIC_RETIRED", "EventCode": "0x2000", - "BriefDescription": "Integer arithmetic instruction retired" + "BriefDescription": "Counts integer arithmetic instructions retired" }, { "EventName": "CONDITIONAL_BRANCH_RETIRED", "EventCode": "0x4000", - "BriefDescription": "Conditional branch retired" + "BriefDescription": "Counts conditional branch instructions retired" }, { "EventName": "JAL_INSTRUCTION_RETIRED", "EventCode": "0x8000", - "BriefDescription": "JAL instruction retired" + "BriefDescription": "Counts jump-and-link instructions retired" }, { "EventName": "JALR_INSTRUCTION_RETIRED", "EventCode": "0x10000", - "BriefDescription": "JALR instruction retired" + "BriefDescription": "Counts indirect jump instructions (JALR) retired" }, { "EventName": "INTEGER_MULTIPLICATION_RETIRED", "EventCode": "0x20000", - "BriefDescription": "Integer multiplication instruction retired" + "BriefDescription": "Counts integer multiplication instructions retired" }, { "EventName": "INTEGER_DIVISION_RETIRED", "EventCode": "0x40000", - "BriefDescription": "Integer division instruction retired" + "BriefDescription": "Counts integer division instructions retired" }, { "EventName": "FP_LOAD_RETIRED", "EventCode": "0x80000", - "BriefDescription": "Floating-point load instruction retired" + "BriefDescription": "Counts floating-point load instructions retired" }, { "EventName": "FP_STORE_RETIRED", "EventCode": "0x100000", - "BriefDescription": "Floating-point store instruction retired" + "BriefDescription": "Counts floating-point store instructions retired" }, { - "EventName": "FP_ADDITION_RETIRED", + "EventName": "FP_ADD_RETIRED", "EventCode": "0x200000", - "BriefDescription": "Floating-point addition retired" + "BriefDescription": "Counts floating-point add instructions retired" }, { - "EventName": "FP_MULTIPLICATION_RETIRED", + "EventName": "FP_MUL_RETIRED", "EventCode": "0x400000", - "BriefDescription": "Floating-point multiplication retired" + "BriefDescription": "Counts floating-point multiply instructions retired" }, { - "EventName": "FP_FUSEDMADD_RETIRED", + "EventName": "FP_MULADD_RETIRED", "EventCode": "0x800000", - "BriefDescription": "Floating-point fused multiply-add retired" + "BriefDescription": "Counts floating-point fused multiply-add instructions retired" }, { "EventName": "FP_DIV_SQRT_RETIRED", "EventCode": "0x1000000", - "BriefDescription": "Floating-point division or square-root retired" + "BriefDescription": "Counts floating point divide or square root instructions retired" }, { "EventName": "OTHER_FP_RETIRED", "EventCode": "0x2000000", - "BriefDescription": "Other floating-point instruction retired" + "BriefDescription": "Counts other floating-point instructions retired" } -] \ No newline at end of file +] diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json index ba3168f8a4cd..70441a55dd66 100644 --- a/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json @@ -1,32 +1,32 @@ [ { - "EventName": "ICACHE_RETIRED", + "EventName": "ICACHE_MISS", "EventCode": "0x102", - "BriefDescription": "Instruction cache miss" + "BriefDescription": "Counts instruction cache misses" }, { - "EventName": "DCACHE_MISS_MMIO_ACCESSES", + "EventName": "DCACHE_MISS", "EventCode": "0x202", - "BriefDescription": "Data cache miss or memory-mapped I/O access" + "BriefDescription": "Counts data cache misses" }, { - "EventName": "DCACHE_WRITEBACK", + "EventName": "DCACHE_RELEASE", "EventCode": "0x402", - "BriefDescription": "Data cache write-back" + "BriefDescription": "Counts writeback requests from the data cache" }, { - "EventName": "INST_TLB_MISS", + "EventName": "ITLB_MISS", "EventCode": "0x802", - "BriefDescription": "Instruction TLB miss" + "BriefDescription": "Counts Instruction TLB misses caused by instruction address translation requests" }, { - "EventName": "DATA_TLB_MISS", + "EventName": "DTLB_MISS", "EventCode": "0x1002", - "BriefDescription": "Data TLB miss" + "BriefDescription": "Counts Data TLB misses caused by data address translation requests" }, { "EventName": "UTLB_MISS", "EventCode": "0x2002", - "BriefDescription": "UTLB miss" + "BriefDescription": "Counts Unified TLB misses caused by address translation requests" } -] \ No newline at end of file +] diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json index 8036e72fb0d4..d9cdb7d747ee 100644 --- a/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json @@ -2,56 +2,56 @@ { "EventName": "ADDRESSGEN_INTERLOCK", "EventCode": "0x101", - "BriefDescription": "Address-generation interlock" + "BriefDescription": "Counts cycles with an address-generation interlock" }, { - "EventName": "LONGLAT_INTERLOCK", + "EventName": "LONGLATENCY_INTERLOCK", "EventCode": "0x201", - "BriefDescription": "Long-latency interlock" + "BriefDescription": "Counts cycles with a long-latency interlock" }, { - "EventName": "CSR_READ_INTERLOCK", + "EventName": "CSR_INTERLOCK", "EventCode": "0x401", - "BriefDescription": "CSR read interlock" + "BriefDescription": "Counts cycles with a CSR interlock" }, { - "EventName": "ICACHE_ITIM_BUSY", + "EventName": "ICACHE_BLOCKED", "EventCode": "0x801", - "BriefDescription": "Instruction cache/ITIM busy" + "BriefDescription": "Counts cycles in which the instruction cache was not able to provide an instruction" }, { - "EventName": "DCACHE_DTIM_BUSY", + "EventName": "DCACHE_BLOCKED", "EventCode": "0x1001", - "BriefDescription": "Data cache/DTIM busy" + "BriefDescription": "Counts cycles in which the data cache blocked an instruction" }, { "EventName": "BRANCH_DIRECTION_MISPREDICTION", "EventCode": "0x2001", - "BriefDescription": "Branch direction misprediction" + "BriefDescription": "Counts mispredictions of conditional branch direction (taken/not taken)" }, { "EventName": "BRANCH_TARGET_MISPREDICTION", "EventCode": "0x4001", - "BriefDescription": "Branch/jump target misprediction" + "BriefDescription": "Counts mispredictions of the target PC of control-flow instructions" }, { - "EventName": "PIPE_FLUSH_CSR_WRITE", + "EventName": "PIPELINE_FLUSH", "EventCode": "0x8001", - "BriefDescription": "Pipeline flush from CSR write" + "BriefDescription": "Counts flushes of the core pipeline. Common causes include fence.i and CSR accesses" }, { - "EventName": "PIPE_FLUSH_OTHER_EVENT", + "EventName": "REPLAY", "EventCode": "0x10001", - "BriefDescription": "Pipeline flush from other event" + "BriefDescription": "Counts instruction replays" }, { - "EventName": "INTEGER_MULTIPLICATION_INTERLOCK", + "EventName": "INTEGER_MUL_DIV_INTERLOCK", "EventCode": "0x20001", - "BriefDescription": "Integer multiplication interlock" + "BriefDescription": "Counts cycles with a multiply or divide interlock" }, { "EventName": "FP_INTERLOCK", "EventCode": "0x40001", - "BriefDescription": "Floating-point interlock" + "BriefDescription": "Counts cycles with a floating-point interlock" } -] \ No newline at end of file +] From patchwork Thu Feb 13 01:21:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13974110 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 9547BC021A0 for ; Thu, 13 Feb 2025 22:03:57 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=8HqJOYZPjHTNO4NFvdUCwXtzjK0qxTAg1LXpmf+m0bw=; b=X77lUgwKlS15cx D51G40cnD+LSsKfTnEXzJ2LY6L+c9ix7+iu/+Za02RJIYMqbTryj+MqJLMMOj6xculLvk3XnKHi5h ZksRpPCMYz+ODAyi2R08/elRonj+X7zMeAq+gZwuZ8TCHyaASgrFSF9Y1ENL68DhJI4lJ4bHEt9ah kfxvky3LVCuOL+DBMVFlyP0kOrAWa7F8W9dQJa6Ib5mj2UazpKlPOVRt68+Ad7tmWLH1UnEcmd5W2 lx5jeSOT4OKn4EFqzSlJpSfnyyx7JsdQ6gRJfDNHgbSziLeLM1RuW5aOgF6qHFXL+GuV3sbT7CUPq y3kaykzMFpL9cF5rYAww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tihJI-0000000ClWn-25Th; Thu, 13 Feb 2025 22:03:52 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tihJG-0000000ClUI-0jsi for linux-riscv@lists.infradead.org; Thu, 13 Feb 2025 22:03:51 +0000 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-21f44e7eae4so25677635ad.2 for ; Thu, 13 Feb 2025 14:03:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1739484229; x=1740089029; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=W/XRmolauA8HsXL+HjHSdxsYuvck1P5cD8Pp1VwoHlc=; b=SEivPpykx3Hj7rzZx98QlhdK9i/paurXgKDlYyJf4vxmpb7cnsxDl9vWl9PSOUOXtc B8AHfxwO3Opx1JECmlRNDDEpIedRRrlVF5vq1pqHCfemnZ2kbd5SxnRcsQIMloXQyiNS 6X/y1UPm4HjChWq6ogf3CipfYvHSzso94Z1DbAFhOZq/b5eiXfP74jL4if7X0jTmVmGT ng2C+s9xw4IUbdlSKJTgOwFWubz0/wI5G5FrC5Lkxhgr0V7fJMiz+DsGvpBuLjXusj6d WBls2Fy2y27VthIESBN5qgL5+spDX/mD1MhTavZbyTurpzvxAVhPQwQoQJFCOy30XgU0 NB6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739484229; x=1740089029; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W/XRmolauA8HsXL+HjHSdxsYuvck1P5cD8Pp1VwoHlc=; b=t25mqW+6rM5tnRlhacaJpicJGwOCbAxlPDf2wZJydv43jywQwpUV/2GTb63/brqA1x N6+VzNf7XI8DMxWH5DVnu4CuPpOz3CB3bzU8S9WVrgQcuE0sx0xtym0Wp8X8unV/rORQ pW6fpCcOjpEVGu1XjLilfV82JqR0Ht+EFAy8263EHt1t96MNVXZMqq2d7FRCpbRV77ze boXDvnnso/pjIcMUI1/F5eDiU6yRet4a5P4qXJ4HbZBwKi+DvzjTsHxPAMs9c1cmmzY3 LsKikjf5UvM5MnprTK3utvD1dwExqtTFQKlRaq1TMNFATX/DH14Pt2knmIN4uQoBOpUC N3Xg== X-Forwarded-Encrypted: i=1; AJvYcCU1FaUxaQf23JrM0WXqAV/iyYqZNHOew5rYa0QOtD37Bp8zMyO6h9cdjlJ61O/gdupGh3docOG7eT2YWw==@lists.infradead.org X-Gm-Message-State: AOJu0YwvpvkJ/zPfjotriaKVpYzhsFm8xdO7+pipVaXa14tH4w0rdGKS m1ZX/CVZG397pHPXr6wlXEOGJrt25571BJyqe6FQ9Pr85Xc+dTGyQaA8x0vKgP4= X-Gm-Gg: ASbGncuO/BsrmUIyGtYsVC1jtaeVrBI44lPKDVs7EuVktmv1fPUBG9jBuxW61yCn+UK YhCnkbizC3AL2r608vXK3Awo7QF2cR5lbZfGCRGGkxBykjlkrD9uGShzbsZKvKUgHVYVUzy9WU5 MkrmOrQz1u2AF/VzjiPV4Q33EeXytgl45rUOEmxjnwXlyIrPPT/OF+3e8rj0Wd8kw2/r8R6VTlJ lSGP+czO7aAn9R9PNCJ7ApPpB9bGz/8GMnjzapaLCGWl3ualBvq3h2xMYv4lZBC0hA9DohQBXSV phWIgcI9Jd0aX5oT4imLCSgjThwm9Jhvp399pA== X-Google-Smtp-Source: AGHT+IFr5642PZ4S4cAQu565jWRyFkBlnbXCXSsluhdUxLUrOkhRXXGZABXTDLwLTypE1Yp85dnzGQ== X-Received: by 2002:a05:6a00:848:b0:730:8d25:4c31 with SMTP id d2e1a72fcca58-7322c38506cmr15085587b3a.8.1739484229334; Thu, 13 Feb 2025 14:03:49 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7324273e438sm1847491b3a.94.2025.02.13.14.03.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 14:03:49 -0800 (PST) From: Samuel Holland To: Arnaldo Carvalho de Melo , Ian Rogers , Palmer Dabbelt , linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Mark Rutland , Adrian Hunter , Alexander Shishkin , linux-kernel@vger.kernel.org, Jiri Olsa , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Arnaldo Carvalho de Melo , Eric Lin , Samuel Holland Subject: [RESEND PATCH 4/7] perf vendor events riscv: Add SiFive Bullet version 0x07 events Date: Wed, 12 Feb 2025 17:21:37 -0800 Message-ID: <20250213220341.3215660-5-samuel.holland@sifive.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250213220341.3215660-1-samuel.holland@sifive.com> References: <20250213220341.3215660-1-samuel.holland@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250213_140350_219697_F0D2C46E X-CRM114-Status: GOOD ( 17.06 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Eric Lin SiFive Bullet microarchitecture cores with mimpid values starting with 0x07 or greater add new PMU events to support debug, trace, and counter sampling and filtering (Sscofpmf). All other PMU events are unchanged from earlier Bullet cores. Signed-off-by: Eric Lin Co-developed-by: Samuel Holland Signed-off-by: Samuel Holland --- tools/perf/pmu-events/arch/riscv/mapfile.csv | 1 + .../cycle-and-instruction-count.json | 12 ++++ .../arch/riscv/sifive/bullet-07/firmware.json | 1 + .../riscv/sifive/bullet-07/instruction.json | 1 + .../arch/riscv/sifive/bullet-07/memory.json | 1 + .../riscv/sifive/bullet-07/microarch.json | 62 +++++++++++++++++++ .../riscv/sifive/bullet-07/watchpoint.json | 42 +++++++++++++ 7 files changed, 120 insertions(+) create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/cycle-and-instruction-count.json create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/firmware.json create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/instruction.json create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/memory.json create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/microarch.json create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/watchpoint.json diff --git a/tools/perf/pmu-events/arch/riscv/mapfile.csv b/tools/perf/pmu-events/arch/riscv/mapfile.csv index 521f416b0006..8706d289215e 100644 --- a/tools/perf/pmu-events/arch/riscv/mapfile.csv +++ b/tools/perf/pmu-events/arch/riscv/mapfile.csv @@ -15,6 +15,7 @@ # #MVENDORID-MARCHID-MIMPID,Version,Filename,EventType 0x489-0x8000000000000007-0x[[:xdigit:]]+,v1,sifive/bullet,core +0x489-0x8000000000000[1-9a-e]07-0x[78ac][[:xdigit:]]+,v1,sifive/bullet-07,core 0x5b7-0x0-0x0,v1,thead/c900-legacy,core 0x67e-0x80000000db0000[89]0-0x[[:xdigit:]]+,v1,starfive/dubhe-80,core 0x31e-0x8000000000008a45-0x[[:xdigit:]]+,v1,andes/ax45,core diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/cycle-and-instruction-count.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/cycle-and-instruction-count.json new file mode 100644 index 000000000000..5c8124cfe926 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/cycle-and-instruction-count.json @@ -0,0 +1,12 @@ +[ + { + "EventName": "CORE_CLOCK_CYCLES", + "EventCode": "0x165", + "BriefDescription": "Counts core clock cycles" + }, + { + "EventName": "INSTRUCTIONS_RETIRED", + "EventCode": "0x265", + "BriefDescription": "Counts instructions retired" + } +] diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/firmware.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/firmware.json new file mode 120000 index 000000000000..34e5c2870eee --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/firmware.json @@ -0,0 +1 @@ +../bullet/firmware.json \ No newline at end of file diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/instruction.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/instruction.json new file mode 120000 index 000000000000..62eacc2d7497 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/instruction.json @@ -0,0 +1 @@ +../bullet/instruction.json \ No newline at end of file diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/memory.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/memory.json new file mode 120000 index 000000000000..df50fc47a5fe --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/memory.json @@ -0,0 +1 @@ +../bullet/memory.json \ No newline at end of file diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/microarch.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/microarch.json new file mode 100644 index 000000000000..de8efd7b8b34 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/microarch.json @@ -0,0 +1,62 @@ +[ + { + "EventName": "ADDRESSGEN_INTERLOCK", + "EventCode": "0x101", + "BriefDescription": "Counts cycles with an address-generation interlock" + }, + { + "EventName": "LONGLATENCY_INTERLOCK", + "EventCode": "0x201", + "BriefDescription": "Counts cycles with a long-latency interlock" + }, + { + "EventName": "CSR_INTERLOCK", + "EventCode": "0x401", + "BriefDescription": "Counts cycles with a CSR interlock" + }, + { + "EventName": "ICACHE_BLOCKED", + "EventCode": "0x801", + "BriefDescription": "Counts cycles in which the instruction cache was not able to provide an instruction" + }, + { + "EventName": "DCACHE_BLOCKED", + "EventCode": "0x1001", + "BriefDescription": "Counts cycles in which the data cache blocked an instruction" + }, + { + "EventName": "BRANCH_DIRECTION_MISPREDICTION", + "EventCode": "0x2001", + "BriefDescription": "Counts mispredictions of conditional branch direction (taken/not taken)" + }, + { + "EventName": "BRANCH_TARGET_MISPREDICTION", + "EventCode": "0x4001", + "BriefDescription": "Counts mispredictions of the target PC of control-flow instructions" + }, + { + "EventName": "PIPELINE_FLUSH", + "EventCode": "0x8001", + "BriefDescription": "Counts flushes of the core pipeline. Common causes include fence.i and CSR accesses" + }, + { + "EventName": "REPLAY", + "EventCode": "0x10001", + "BriefDescription": "Counts instruction replays" + }, + { + "EventName": "INTEGER_MUL_DIV_INTERLOCK", + "EventCode": "0x20001", + "BriefDescription": "Counts cycles with a multiply or divide interlock" + }, + { + "EventName": "FP_INTERLOCK", + "EventCode": "0x40001", + "BriefDescription": "Counts cycles with a floating-point interlock" + }, + { + "EventName": "TRACE_STALL", + "EventCode": "0x80001", + "BriefDescription": "Counts cycles in which the core pipeline is stalled due to backpressure from the Trace Encoder" + } +] diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/watchpoint.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/watchpoint.json new file mode 100644 index 000000000000..aa7a12818521 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/watchpoint.json @@ -0,0 +1,42 @@ +[ + { + "EventName": "WATCHPOINT_0", + "EventCode": "0x164", + "BriefDescription": "Counts occurrences of watchpoint 0 with action=8" + }, + { + "EventName": "WATCHPOINT_1", + "EventCode": "0x264", + "BriefDescription": "Counts occurrences of watchpoint 1 with action=8" + }, + { + "EventName": "WATCHPOINT_2", + "EventCode": "0x464", + "BriefDescription": "Counts occurrences of watchpoint 2 with action=8" + }, + { + "EventName": "WATCHPOINT_3", + "EventCode": "0x864", + "BriefDescription": "Counts occurrences of watchpoint 3 with action=8" + }, + { + "EventName": "WATCHPOINT_4", + "EventCode": "0x1064", + "BriefDescription": "Counts occurrences of watchpoint 4 with action=8" + }, + { + "EventName": "WATCHPOINT_5", + "EventCode": "0x2064", + "BriefDescription": "Counts occurrences of watchpoint 5 with action=8" + }, + { + "EventName": "WATCHPOINT_6", + "EventCode": "0x4064", + "BriefDescription": "Counts occurrences of watchpoint 6 with action=8" + }, + { + "EventName": "WATCHPOINT_7", + "EventCode": "0x8064", + "BriefDescription": "Counts occurrences of watchpoint 7 with action=8" + } +] From patchwork Thu Feb 13 01:21:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13974111 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 8D551C021A7 for ; Thu, 13 Feb 2025 22:03:58 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=PsoCD9YrRRhH5VnpaUaVvpFNAO9bwMu56KWR1teXqv0=; b=mxFTlZcoLs7yMX 9qLRBtQF4G/WUgQr0+2keBOiUY65DDUpfqYsJRVD8lPs1/XXhl4KamN79UdCKX2PDweb6dm+Zsi5/ 2i8WP9V3Mmm5G+iBGSRaq/e3lj889efZnz/a600lPCXuG1YHRpfCi/5L5LDqSsIgqQZhj78jiotIP LX812Yg5A10RGZEyubjyP5fqdyD2LUXZtCrv5WpRUz5UGKetTBX06t2xElprZX1dyQUKkISexWJkz YlmwtkTTLomuAn1brfj0Akxjz0LCpS/BPol/3iBLOOjVZI6wdf3oYnFCMlMyQq3qnQRYqucNO7LSs Wfp9mUwDKWtUkl6mpkIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tihJK-0000000ClYl-157P; Thu, 13 Feb 2025 22:03:54 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tihJH-0000000ClV6-0xbe for linux-riscv@lists.infradead.org; Thu, 13 Feb 2025 22:03:52 +0000 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-21f61b01630so40787435ad.1 for ; Thu, 13 Feb 2025 14:03:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1739484231; x=1740089031; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QpwIO49GNbtoyWqWXl7vLneMjnaxCqv/Wwmz/9PWqJA=; b=LT9FNsgLjtDTD5dTBHJqYGdAhNIh7TohvIOSm2ifiawCJudGI26ZAgYx+Z80hZPrYL Jz0bpt3t2Ce1nCPndmF52NMx2Ke6Lkh5hXPHcOMGzLkCXjsnccs1Jgb4ucobeCIrYqRC Gf6cJeYm6kzyTVQw5zerv3dg3EfwWWYx84CJoqGW2hZlvWM9CC4obXndzPyVnz05atLC HBK7LKoCxmNc7itrR9mWuIqq1oh/MByhC5sKxFysWdgzEpniISUammvjCfbo5VXFn3KB eDRRV5PpEsGdCYAmhyuXok1q17lU/ATa7Bn1JCtZlmquoMGodAGGKubMytYQisYejJCI xyjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739484231; x=1740089031; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QpwIO49GNbtoyWqWXl7vLneMjnaxCqv/Wwmz/9PWqJA=; b=DK3qV+necCcqhFiXCn2fqDvOcqS+ZkKspUCVoaZRcKp+c1mfdSM+7JoWbGXEQv5+zH 7C8ZIFp41hHDbB47AbRKQrw+YjESdBwGBQAZ752AxOeIVmotHQalYLEDGfacFWEwnh8t KTrmY1VAe279sIq75HB1Jfd2o0L2fx0zf8DUwsp1f7AQzVY0lDRUVhXkS1Olhmf+MwXV nNmO40W/codBIYpxRPyOV0H8PF8sjV1L8MBmEKJ6lSC3xTF2YrehOpJIFqVQ6T1k4ja1 CtA6mMG2CCLeiLTjWYze79Wzq2msWXcRtmY2+tT1cQL3mrYnlX13M983CcJHk4Av/FVd 9eow== X-Forwarded-Encrypted: i=1; AJvYcCVAPszvjDm6KSpc7uDOhg+wiaHI0LM1HQb1NBACPjUKYOtOMu3mRSvsc9g80g3kdY86Oj/4/XSnnIw9jA==@lists.infradead.org X-Gm-Message-State: AOJu0YwJ2iHrr1a8islsWKrr6lIatPsaXo0Jr6ceXhubbeZYzlpK2Ma6 Cw9TsZvXju56y0+QS/lu51NxNGeOFewsTpVV7tl3o6zJ8Z77c+M4wMom2TMCnsk= X-Gm-Gg: ASbGnctQK6NXoCcTTLUlhMjAUVBeBCzKihseU53/56OzYQB777j696iQSJHis7M7MYd KtpRgkoREu34H7v0gEWDyySxM6yTlWl/hnVoc4ojTbYkuA20JW/Sk6DBoo7DYIi8692jF9NbDzr rc013OsXFdQkFe1hqiZ/cgvZJIoytVN5Cn8CAdueETmgBZaVEGPPdWfWHTNkPXyCJYUAGrztn99 iFuwpanHErQxNkEYA18VOHKI3Gcvo1mw9OffW178eNgT6XGEDkgQAPP29FLBFZYAgXdMg363Dhw QUqKx1xRtQ/jGP8BH27EtDpvlJfz7CjE42ALqA== X-Google-Smtp-Source: AGHT+IHyp5GPdiF4nIYOwtKcjQEfdkn2i33PogWXmBC+DOooDH454z3E0beNUeVSYbV2PZWSHNiXZw== X-Received: by 2002:a05:6a00:2d82:b0:725:4915:c10 with SMTP id d2e1a72fcca58-7323c76e38fmr8546927b3a.10.1739484230699; Thu, 13 Feb 2025 14:03:50 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7324273e438sm1847491b3a.94.2025.02.13.14.03.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 14:03:50 -0800 (PST) From: Samuel Holland To: Arnaldo Carvalho de Melo , Ian Rogers , Palmer Dabbelt , linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Mark Rutland , Adrian Hunter , Alexander Shishkin , linux-kernel@vger.kernel.org, Jiri Olsa , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Arnaldo Carvalho de Melo , Eric Lin , Samuel Holland Subject: [RESEND PATCH 5/7] perf vendor events riscv: Add SiFive Bullet version 0x0d events Date: Wed, 12 Feb 2025 17:21:38 -0800 Message-ID: <20250213220341.3215660-6-samuel.holland@sifive.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250213220341.3215660-1-samuel.holland@sifive.com> References: <20250213220341.3215660-1-samuel.holland@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250213_140351_282317_9C449184 X-CRM114-Status: GOOD ( 15.66 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Eric Lin SiFive Bullet microarchitecture cores with mimpid values starting with 0x0d or greater add new PMU events to count TLB miss stall cycles. All other PMU events are unchanged from earlier Bullet cores. Signed-off-by: Eric Lin Signed-off-by: Samuel Holland --- tools/perf/pmu-events/arch/riscv/mapfile.csv | 1 + .../cycle-and-instruction-count.json | 1 + .../arch/riscv/sifive/bullet-0d/firmware.json | 1 + .../riscv/sifive/bullet-0d/instruction.json | 1 + .../arch/riscv/sifive/bullet-0d/memory.json | 1 + .../riscv/sifive/bullet-0d/microarch.json | 72 +++++++++++++++++++ .../riscv/sifive/bullet-0d/watchpoint.json | 1 + 7 files changed, 78 insertions(+) create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/cycle-and-instruction-count.json create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/firmware.json create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/instruction.json create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/memory.json create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/microarch.json create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/watchpoint.json diff --git a/tools/perf/pmu-events/arch/riscv/mapfile.csv b/tools/perf/pmu-events/arch/riscv/mapfile.csv index 8706d289215e..9e9bd7ac0ebe 100644 --- a/tools/perf/pmu-events/arch/riscv/mapfile.csv +++ b/tools/perf/pmu-events/arch/riscv/mapfile.csv @@ -16,6 +16,7 @@ #MVENDORID-MARCHID-MIMPID,Version,Filename,EventType 0x489-0x8000000000000007-0x[[:xdigit:]]+,v1,sifive/bullet,core 0x489-0x8000000000000[1-9a-e]07-0x[78ac][[:xdigit:]]+,v1,sifive/bullet-07,core +0x489-0x8000000000000[1-9a-e]07-0xd[[:xdigit:]]+,v1,sifive/bullet-0d,core 0x5b7-0x0-0x0,v1,thead/c900-legacy,core 0x67e-0x80000000db0000[89]0-0x[[:xdigit:]]+,v1,starfive/dubhe-80,core 0x31e-0x8000000000008a45-0x[[:xdigit:]]+,v1,andes/ax45,core diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/cycle-and-instruction-count.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/cycle-and-instruction-count.json new file mode 120000 index 000000000000..ccd29278f61b --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/cycle-and-instruction-count.json @@ -0,0 +1 @@ +../bullet-07/cycle-and-instruction-count.json \ No newline at end of file diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/firmware.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/firmware.json new file mode 120000 index 000000000000..34e5c2870eee --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/firmware.json @@ -0,0 +1 @@ +../bullet/firmware.json \ No newline at end of file diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/instruction.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/instruction.json new file mode 120000 index 000000000000..62eacc2d7497 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/instruction.json @@ -0,0 +1 @@ +../bullet/instruction.json \ No newline at end of file diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/memory.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/memory.json new file mode 120000 index 000000000000..df50fc47a5fe --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/memory.json @@ -0,0 +1 @@ +../bullet/memory.json \ No newline at end of file diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/microarch.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/microarch.json new file mode 100644 index 000000000000..6573b24788eb --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/microarch.json @@ -0,0 +1,72 @@ +[ + { + "EventName": "ADDRESSGEN_INTERLOCK", + "EventCode": "0x101", + "BriefDescription": "Counts cycles with an address-generation interlock" + }, + { + "EventName": "LONGLATENCY_INTERLOCK", + "EventCode": "0x201", + "BriefDescription": "Counts cycles with a long-latency interlock" + }, + { + "EventName": "CSR_INTERLOCK", + "EventCode": "0x401", + "BriefDescription": "Counts cycles with a CSR interlock" + }, + { + "EventName": "ICACHE_BLOCKED", + "EventCode": "0x801", + "BriefDescription": "Counts cycles in which the instruction cache was not able to provide an instruction" + }, + { + "EventName": "DCACHE_BLOCKED", + "EventCode": "0x1001", + "BriefDescription": "Counts cycles in which the data cache blocked an instruction" + }, + { + "EventName": "BRANCH_DIRECTION_MISPREDICTION", + "EventCode": "0x2001", + "BriefDescription": "Counts mispredictions of conditional branch direction (taken/not taken)" + }, + { + "EventName": "BRANCH_TARGET_MISPREDICTION", + "EventCode": "0x4001", + "BriefDescription": "Counts mispredictions of the target PC of control-flow instructions" + }, + { + "EventName": "PIPELINE_FLUSH", + "EventCode": "0x8001", + "BriefDescription": "Counts flushes of the core pipeline. Common causes include fence.i and CSR accesses" + }, + { + "EventName": "REPLAY", + "EventCode": "0x10001", + "BriefDescription": "Counts instruction replays" + }, + { + "EventName": "INTEGER_MUL_DIV_INTERLOCK", + "EventCode": "0x20001", + "BriefDescription": "Counts cycles with a multiply or divide interlock" + }, + { + "EventName": "FP_INTERLOCK", + "EventCode": "0x40001", + "BriefDescription": "Counts cycles with a floating-point interlock" + }, + { + "EventName": "TRACE_STALL", + "EventCode": "0x80001", + "BriefDescription": "Counts cycles in which the core pipeline is stalled due to backpressure from the Trace Encoder" + }, + { + "EventName": "ITLB_MISS_STALL", + "EventCode": "0x100001", + "BriefDescription": "Counts cycles in which the core pipeline is stalled due to ITLB Miss" + }, + { + "EventName": "DTLB_MISS_STALL", + "EventCode": "0x200001", + "BriefDescription": "Counts cycles in which the core pipeline is stalled due to DTLB Miss" + } +] diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/watchpoint.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/watchpoint.json new file mode 120000 index 000000000000..e88b98bfc5c8 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/watchpoint.json @@ -0,0 +1 @@ +../bullet-07/watchpoint.json \ No newline at end of file From patchwork Thu Feb 13 01:21:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13974112 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 0B56AC021A0 for ; Thu, 13 Feb 2025 22:04:02 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=8ijvioFhj4BRWPl/eAgiseGhyj3vRHjHPVNZALR+o9Q=; b=NyMFRb8plG1kzv uU8uGvY2E6Ps4/JuOdoLNorwocFp5uWifSdo3ya7NXZsHccy4ROU+rmiDxDlZJCY6dqjlsL6jlKO4 GRSw/OLMHZ6fM/ezUoourDpOFpHwbXvd6FicGtzkqyj8aO4Tm4h/DOXG1qCfKPkL5vrLUEjwBIr9E 82KVoYageF7S60emaGs6vgqevk7GOzu2jVfgfhOLuX22EKT6teK9MMMBvfekU6MAcaYMMxZ3Yg/n6 J11uWxnCzNkmI2tKZ5UuJpc8dvED3lGO6OyMlYjyQiOA9KfOgb0aDwf3p6s+RWv+/OzO5vm36MujG 0j4fVcITx2/DLo0/8BtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tihJN-0000000Clb0-01uC; Thu, 13 Feb 2025 22:03:57 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tihJJ-0000000ClWs-0dtV for linux-riscv@lists.infradead.org; Thu, 13 Feb 2025 22:03:54 +0000 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-220d39a5627so19615025ad.1 for ; Thu, 13 Feb 2025 14:03:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1739484232; x=1740089032; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=18UWmkwgQnETzvo0Aj9eOHJgSlzdNFYfZZtF5VBdI4M=; b=hs2pTp+2/cigxrfb3AJzFcJLE3MTyL5eH3YEL8if+XODPPlqi+qHDd9hBRO3iibXA6 4fK5WiHzBuUtfTXc0eG5JDx8zJOauybo/tDL006Pe0e+8BEbRMVo281u7oGUtzN7Lf+J XwvMnI269+e6e3yU/We94rTp+4//bGhAwo+Bpoes3Vbk6RYI8MJTOWTXIjunu/wgzrBh Qfduaa/KZ2c4XJAvlw36B2I2NBEJWbLxs32PZV801rAGAtcBwM1vxg6zPd/HUiMG6FFt mqQgXeZyDxvkaRqNCB2pDkiOjmkEMrteLzFHNKNIU0T7C9rN3/9OTVPFVhJbLqkEBUG1 1+7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739484232; x=1740089032; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=18UWmkwgQnETzvo0Aj9eOHJgSlzdNFYfZZtF5VBdI4M=; b=l7kyUG25dCEBeCBpo1DGko8XRTHuLG7X96G817iZaGmCvd0Rpfmp6cpJ6jmYQsyj3r 2VTfh1H/6n3jwz5HvHIBbPuycM10EdBxDfb102XnlAz6q/dapYGv1oIKULCOIg0hBvyr cGDsx6XnDYSnmivYCrr0LCfI/RSUNVK6BTyFmWBsBIKy0zmGPrQtG0/OXc+BN35E/Txk JDeNZr+lavkIUFL+54z++y8EdVslGZ7o15deOjR/kUlKEAZOJK0LcYET7Sma3Q3sA401 9LCtL7uweFwkEuaFvkCEd5mHzz4s9u7WKJDNp+eJW8Xu1h4wUKD0dr+fgejoFDy7LXcp OV+g== X-Forwarded-Encrypted: i=1; AJvYcCUqmjqEDES/RJn3+5ZnedpKj+FjjwjVIjLyfXQISzwHL5/DWDqttdIb8b2HV9i/e5SR/wrJ3wSrv4vtIQ==@lists.infradead.org X-Gm-Message-State: AOJu0YxrNNJwiSE8y9CtfN5jPgB0//+y9LZLx70evvks0bedl7o9Ed/F mocO2O7l2ED4vdhjByOhfOyz6JOp2gc5x64iaWoa72n3jbBCNopszjK+gWGfPUI= X-Gm-Gg: ASbGncvuxIxbe8nVGTrcke11xIFJ7goHKYOGCqV5YMGCk/h5ZsX8ZXPaPDnS2FIbwbL mXprFlfkBYpo5aKl2fAWDvkPywu628AhVOdXraZgdwbx6Jcm0od5Uv9rNeQsLXHZvaWqJB6uM4H I6OXqyVSY/Itv0Aq+WO+vMzrd3/gJbRNEIjijIBSXr9pX7vOMB08h3PJ1gmCHHwTzLV1VhhwPHc YwvnutdkKVvmFtry7nnRLe4Svo02skYjfQhD2f1luMhrUkOKmq3MGlXCM9nYF5gVeGNEKM+TtJO srqHB8kmT8xWMpMvBpz/V7Gkqm5FJJZpQNKCow== X-Google-Smtp-Source: AGHT+IGLTppNEBIeBL2TiGhJ2DPAD3uNJTiM4rrl/8BgBXGEKYmmklPnZ313IiR6VvxKReIiceuQYA== X-Received: by 2002:a05:6a21:10c:b0:1ed:a6d7:3c07 with SMTP id adf61e73a8af0-1ee5e530dbdmr14915863637.4.1739484232128; Thu, 13 Feb 2025 14:03:52 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7324273e438sm1847491b3a.94.2025.02.13.14.03.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 14:03:51 -0800 (PST) From: Samuel Holland To: Arnaldo Carvalho de Melo , Ian Rogers , Palmer Dabbelt , linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Mark Rutland , Adrian Hunter , Alexander Shishkin , linux-kernel@vger.kernel.org, Jiri Olsa , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Arnaldo Carvalho de Melo , Eric Lin , Samuel Holland Subject: [RESEND PATCH 6/7] perf vendor events riscv: Add SiFive P550 events Date: Wed, 12 Feb 2025 17:21:39 -0800 Message-ID: <20250213220341.3215660-7-samuel.holland@sifive.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250213220341.3215660-1-samuel.holland@sifive.com> References: <20250213220341.3215660-1-samuel.holland@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250213_140353_186246_DB4E9A88 X-CRM114-Status: GOOD ( 14.31 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Eric Lin The SiFive Performance P550 core features an out-of-order microarchitecture which exposes the same PMU events as Bullet, plus events for UTLB hits and PTE cache misses/hits. Add support for specifying these events using symbolic names. Signed-off-by: Eric Lin Co-developed-by: Samuel Holland Signed-off-by: Samuel Holland --- tools/perf/pmu-events/arch/riscv/mapfile.csv | 1 + .../arch/riscv/sifive/p550/firmware.json | 1 + .../arch/riscv/sifive/p550/instruction.json | 1 + .../arch/riscv/sifive/p550/memory.json | 47 +++++++++++++++++++ .../arch/riscv/sifive/p550/microarch.json | 1 + 5 files changed, 51 insertions(+) create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/firmware.json create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/instruction.json create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p550/memory.json create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/microarch.json diff --git a/tools/perf/pmu-events/arch/riscv/mapfile.csv b/tools/perf/pmu-events/arch/riscv/mapfile.csv index 9e9bd7ac0ebe..a301e9dbfd5a 100644 --- a/tools/perf/pmu-events/arch/riscv/mapfile.csv +++ b/tools/perf/pmu-events/arch/riscv/mapfile.csv @@ -17,6 +17,7 @@ 0x489-0x8000000000000007-0x[[:xdigit:]]+,v1,sifive/bullet,core 0x489-0x8000000000000[1-9a-e]07-0x[78ac][[:xdigit:]]+,v1,sifive/bullet-07,core 0x489-0x8000000000000[1-9a-e]07-0xd[[:xdigit:]]+,v1,sifive/bullet-0d,core +0x489-0x8000000000000008-0x[[:xdigit:]]+,v1,sifive/p550,core 0x5b7-0x0-0x0,v1,thead/c900-legacy,core 0x67e-0x80000000db0000[89]0-0x[[:xdigit:]]+,v1,starfive/dubhe-80,core 0x31e-0x8000000000008a45-0x[[:xdigit:]]+,v1,andes/ax45,core diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p550/firmware.json b/tools/perf/pmu-events/arch/riscv/sifive/p550/firmware.json new file mode 120000 index 000000000000..34e5c2870eee --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/p550/firmware.json @@ -0,0 +1 @@ +../bullet/firmware.json \ No newline at end of file diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p550/instruction.json b/tools/perf/pmu-events/arch/riscv/sifive/p550/instruction.json new file mode 120000 index 000000000000..62eacc2d7497 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/p550/instruction.json @@ -0,0 +1 @@ +../bullet/instruction.json \ No newline at end of file diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p550/memory.json b/tools/perf/pmu-events/arch/riscv/sifive/p550/memory.json new file mode 100644 index 000000000000..8393f81b2cf0 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/p550/memory.json @@ -0,0 +1,47 @@ +[ + { + "EventName": "ICACHE_MISS", + "EventCode": "0x102", + "BriefDescription": "Counts instruction cache misses" + }, + { + "EventName": "DCACHE_MISS", + "EventCode": "0x202", + "BriefDescription": "Counts data cache misses" + }, + { + "EventName": "DCACHE_RELEASE", + "EventCode": "0x402", + "BriefDescription": "Counts writeback requests from the data cache" + }, + { + "EventName": "ITLB_MISS", + "EventCode": "0x802", + "BriefDescription": "Counts Instruction TLB misses caused by instruction address translation requests" + }, + { + "EventName": "DTLB_MISS", + "EventCode": "0x1002", + "BriefDescription": "Counts Data TLB misses caused by data address translation requests" + }, + { + "EventName": "UTLB_MISS", + "EventCode": "0x2002", + "BriefDescription": "Counts Unified TLB misses caused by address translation requests" + }, + { + "EventName": "UTLB_HIT", + "EventCode": "0x4002", + "BriefDescription": "Counts Unified TLB hits for address translation requests" + }, + { + "EventName": "PTE_CACHE_MISS", + "EventCode": "0x8002", + "BriefDescription": "Counts Page Table Entry cache misses" + }, + { + "EventName": "PTE_CACHE_HIT", + "EventCode": "0x10002", + "BriefDescription": "Counts Page Table Entry cache hits" + } +] diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p550/microarch.json b/tools/perf/pmu-events/arch/riscv/sifive/p550/microarch.json new file mode 120000 index 000000000000..ba5dd2960e9f --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/p550/microarch.json @@ -0,0 +1 @@ +../bullet/microarch.json \ No newline at end of file From patchwork Thu Feb 13 01:21:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13974113 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 B3747C021A6 for ; Thu, 13 Feb 2025 22:04:02 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=NLTXAGREWjeqnJbuc+HVWUzNuwfLDiQLWHUvHTRsxPA=; b=EfYTBQQ73sTprh x3IlmqT8Z4xP1StnIpB8DbxPMtXRrublhVi2KKVtHUQjnvkXYyYhTtFApDo0ZvDknoQT9Hed+AVPj lfV/npbzr7jPVOV+aoVIuJ/9SI0tPc7FHQsqGeVIg3flGKdfrjVWIeCm1uNFOLAdTPV6lZ4FwauYA kGOLOK5WsejpVHwcxm4UXQwNR9tPZLmG9x2aQpuMPJTax1jfhC5OprF9AUJP//tg86dkh9/2dLuZ+ vIZt14gRfZFjRsdcYWBWYRk0RiUgM2LgJNcifznW950bQY01iCrBKJeS6C0iz8FK1EohrMXmOISMl +Xykf9c6CnjhdRYrvCQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tihJN-0000000ClbZ-2l89; Thu, 13 Feb 2025 22:03:57 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tihJK-0000000ClYd-1nG2 for linux-riscv@lists.infradead.org; Thu, 13 Feb 2025 22:03:55 +0000 Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-2fc261d4ec4so1034219a91.1 for ; Thu, 13 Feb 2025 14:03:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1739484233; x=1740089033; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UG2nUTyFuD2bRxBTq88e6guJsvcgmcc0Y542suaRIS4=; b=Ll2MKU5c7Z0f/0Qx4GNzZyWkd+m799n10r9k1emitwiFYY/J4H9iRDXo6/1C1FuBbt /y19ml+ENo3lJRwXYqbzKEDXAux2fKMdAJhYcsrYqi0YCsoZJbk+jddsPtY0ATDuCPvb nyaD5aA0mloEDFuJ7rthB/uBLwYzW+N5TAJSvaisS1if8ITe4/8W36cYRDwmQ9W8dQtl Qfzq7QjiN1n6xCHh0QcDECYXNM62mr6vdtFgo4SNMLxV7uU4rkdT2f361eik5eB274e8 02E9lZ9s41EODqd2oUaDuxI+kE+cGTU8FzK2v5IoRHkuHb2MFyJ95rThCn+hnJlHdklk ce8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739484233; x=1740089033; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UG2nUTyFuD2bRxBTq88e6guJsvcgmcc0Y542suaRIS4=; b=gfYX6HJnQFnMg3qPQBM4EiTkJmpPpVcNdyd+IFCqk6pGd+xXI1qiR2kviOzESY93T8 a9FBoVLy9tSTUHb7rOmlXU4/ymhZ/cpQIXW91rNAF0zcw4N9Z2fnAj2+5dGDdkL/v9IK Fx4NfGPAR5syPmjWIuWR9FGlEucb5DCsmtsGOPe+5gEwqO/k/tMvTmyrrqUFyJg15nyM dIIkIbSXbHgUiDr28S1C7mT7xbcmU8deRcW+QIsaBDf6nqTxANMrm5/q7iBJKbWWjb0L hkiyFjX3Ze13B3ZmYMtLYr330duyZWp/1C4piQvbWhF50qOdjlGra2ujlCryzORFoWK8 0p0A== X-Forwarded-Encrypted: i=1; AJvYcCUn6vK22bPtzpBgot0+mHCjDc9BPtHOxV7m6gI0/Wgp6tdl0SOZAlQrYPBF2Y+HqT0aFFbOSNqhssodMw==@lists.infradead.org X-Gm-Message-State: AOJu0YxncAgt+PNSUIVQ933hNwoyouMy5YPmw8Tg6UBot8lieUdoRYW0 OMg+QxdFDZz0s+KA1AgrJDQrb6wzkBduzxZ8KJR+zAVucjcohDnGUxKZeaFsBDI= X-Gm-Gg: ASbGncvCXx7EtqQPdQ9ncHuxhgvWuicYXK3zYfJYDgI1XqaeQq4NYnFrepTseoip9H1 0yxLI3RWj1KIYTPOmr9fjbumraUz3fQHIs9JpNtQnGpEJUQmq8ubpHl7fvJqyLONFHXX2HkxfN6 ai8ByxOLImNI5eCr7bil+o+U5yJB8wzaUsvzuPcVrpQ++RDf5QpsHiaIGhruUlr954Ikt0PIz+a nRS1HfmSS6FO6ePNZk4cVwYgMS8cVHcLRJteTruGlfi/qHjx/W8VezS7hn8cObQ//L9Ncdu/cDP aJxYxtx5pz/eyLd/P0o07ZzwXhNypbZeJjT0gQ== X-Google-Smtp-Source: AGHT+IHkEtK2WtSJediFZTvGiONr45YnHwEk70ZnPDsoNzA31ly3EjT2ofcGhhgCoHTMyKTliYHMHw== X-Received: by 2002:a05:6a00:2e84:b0:730:95a6:3761 with SMTP id d2e1a72fcca58-7322c373ebamr16624287b3a.3.1739484233450; Thu, 13 Feb 2025 14:03:53 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7324273e438sm1847491b3a.94.2025.02.13.14.03.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 14:03:53 -0800 (PST) From: Samuel Holland To: Arnaldo Carvalho de Melo , Ian Rogers , Palmer Dabbelt , linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Mark Rutland , Adrian Hunter , Alexander Shishkin , linux-kernel@vger.kernel.org, Jiri Olsa , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Arnaldo Carvalho de Melo , Eric Lin , Samuel Holland Subject: [RESEND PATCH 7/7] perf vendor events riscv: Add SiFive P650 events Date: Wed, 12 Feb 2025 17:21:40 -0800 Message-ID: <20250213220341.3215660-8-samuel.holland@sifive.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250213220341.3215660-1-samuel.holland@sifive.com> References: <20250213220341.3215660-1-samuel.holland@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250213_140354_478142_2CB22AAB X-CRM114-Status: GOOD ( 16.38 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Eric Lin The SiFive Performance P650 core (including the vector-enabled P670 and area-optimized P450/P470 variants) updates the P550 microarchitecture. It brings in the debug, trace, and counter events from newer Bullet cores, and adds new events for iTLB and dTLB multi-hits. All other PMU events are unchanged from the P550 core. Signed-off-by: Eric Lin Co-developed-by: Samuel Holland Signed-off-by: Samuel Holland --- tools/perf/pmu-events/arch/riscv/mapfile.csv | 1 + .../p650/cycle-and-instruction-count.json | 1 + .../arch/riscv/sifive/p650/firmware.json | 1 + .../arch/riscv/sifive/p650/instruction.json | 1 + .../arch/riscv/sifive/p650/memory.json | 57 +++++++++++++++++ .../arch/riscv/sifive/p650/microarch.json | 62 +++++++++++++++++++ .../arch/riscv/sifive/p650/watchpoint.json | 1 + 7 files changed, 124 insertions(+) create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/cycle-and-instruction-count.json create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/firmware.json create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/instruction.json create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/memory.json create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/microarch.json create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/watchpoint.json diff --git a/tools/perf/pmu-events/arch/riscv/mapfile.csv b/tools/perf/pmu-events/arch/riscv/mapfile.csv index a301e9dbfd5a..0a7e7dcc81be 100644 --- a/tools/perf/pmu-events/arch/riscv/mapfile.csv +++ b/tools/perf/pmu-events/arch/riscv/mapfile.csv @@ -18,6 +18,7 @@ 0x489-0x8000000000000[1-9a-e]07-0x[78ac][[:xdigit:]]+,v1,sifive/bullet-07,core 0x489-0x8000000000000[1-9a-e]07-0xd[[:xdigit:]]+,v1,sifive/bullet-0d,core 0x489-0x8000000000000008-0x[[:xdigit:]]+,v1,sifive/p550,core +0x489-0x8000000000000[1-6]08-0x[9b][[:xdigit:]]+,v1,sifive/p650,core 0x5b7-0x0-0x0,v1,thead/c900-legacy,core 0x67e-0x80000000db0000[89]0-0x[[:xdigit:]]+,v1,starfive/dubhe-80,core 0x31e-0x8000000000008a45-0x[[:xdigit:]]+,v1,andes/ax45,core diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p650/cycle-and-instruction-count.json b/tools/perf/pmu-events/arch/riscv/sifive/p650/cycle-and-instruction-count.json new file mode 120000 index 000000000000..ccd29278f61b --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/p650/cycle-and-instruction-count.json @@ -0,0 +1 @@ +../bullet-07/cycle-and-instruction-count.json \ No newline at end of file diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p650/firmware.json b/tools/perf/pmu-events/arch/riscv/sifive/p650/firmware.json new file mode 120000 index 000000000000..34e5c2870eee --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/p650/firmware.json @@ -0,0 +1 @@ +../bullet/firmware.json \ No newline at end of file diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p650/instruction.json b/tools/perf/pmu-events/arch/riscv/sifive/p650/instruction.json new file mode 120000 index 000000000000..62eacc2d7497 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/p650/instruction.json @@ -0,0 +1 @@ +../bullet/instruction.json \ No newline at end of file diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p650/memory.json b/tools/perf/pmu-events/arch/riscv/sifive/p650/memory.json new file mode 100644 index 000000000000..f1431b339c7f --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/p650/memory.json @@ -0,0 +1,57 @@ +[ + { + "EventName": "ICACHE_MISS", + "EventCode": "0x102", + "BriefDescription": "Counts instruction cache misses" + }, + { + "EventName": "DCACHE_MISS", + "EventCode": "0x202", + "BriefDescription": "Counts data cache misses" + }, + { + "EventName": "DCACHE_RELEASE", + "EventCode": "0x402", + "BriefDescription": "Counts writeback requests from the data cache" + }, + { + "EventName": "ITLB_MISS", + "EventCode": "0x802", + "BriefDescription": "Counts Instruction TLB misses caused by instruction address translation requests" + }, + { + "EventName": "DTLB_MISS", + "EventCode": "0x1002", + "BriefDescription": "Counts Data TLB misses caused by data address translation requests" + }, + { + "EventName": "UTLB_MISS", + "EventCode": "0x2002", + "BriefDescription": "Counts Unified TLB misses caused by address translation requests" + }, + { + "EventName": "UTLB_HIT", + "EventCode": "0x4002", + "BriefDescription": "Counts Unified TLB hits for address translation requests" + }, + { + "EventName": "PTE_CACHE_MISS", + "EventCode": "0x8002", + "BriefDescription": "Counts Page Table Entry cache misses" + }, + { + "EventName": "PTE_CACHE_HIT", + "EventCode": "0x10002", + "BriefDescription": "Counts Page Table Entry cache hits" + }, + { + "EventName": "ITLB_MULTI_HIT", + "EventCode": "0x20002", + "BriefDescription": "Counts Instruction TLB multi-hits" + }, + { + "EventName": "DTLB_MULTI_HIT", + "EventCode": "0x40002", + "BriefDescription": "Counts Data TLB multi-hits" + } +] diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p650/microarch.json b/tools/perf/pmu-events/arch/riscv/sifive/p650/microarch.json new file mode 100644 index 000000000000..de8efd7b8b34 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/p650/microarch.json @@ -0,0 +1,62 @@ +[ + { + "EventName": "ADDRESSGEN_INTERLOCK", + "EventCode": "0x101", + "BriefDescription": "Counts cycles with an address-generation interlock" + }, + { + "EventName": "LONGLATENCY_INTERLOCK", + "EventCode": "0x201", + "BriefDescription": "Counts cycles with a long-latency interlock" + }, + { + "EventName": "CSR_INTERLOCK", + "EventCode": "0x401", + "BriefDescription": "Counts cycles with a CSR interlock" + }, + { + "EventName": "ICACHE_BLOCKED", + "EventCode": "0x801", + "BriefDescription": "Counts cycles in which the instruction cache was not able to provide an instruction" + }, + { + "EventName": "DCACHE_BLOCKED", + "EventCode": "0x1001", + "BriefDescription": "Counts cycles in which the data cache blocked an instruction" + }, + { + "EventName": "BRANCH_DIRECTION_MISPREDICTION", + "EventCode": "0x2001", + "BriefDescription": "Counts mispredictions of conditional branch direction (taken/not taken)" + }, + { + "EventName": "BRANCH_TARGET_MISPREDICTION", + "EventCode": "0x4001", + "BriefDescription": "Counts mispredictions of the target PC of control-flow instructions" + }, + { + "EventName": "PIPELINE_FLUSH", + "EventCode": "0x8001", + "BriefDescription": "Counts flushes of the core pipeline. Common causes include fence.i and CSR accesses" + }, + { + "EventName": "REPLAY", + "EventCode": "0x10001", + "BriefDescription": "Counts instruction replays" + }, + { + "EventName": "INTEGER_MUL_DIV_INTERLOCK", + "EventCode": "0x20001", + "BriefDescription": "Counts cycles with a multiply or divide interlock" + }, + { + "EventName": "FP_INTERLOCK", + "EventCode": "0x40001", + "BriefDescription": "Counts cycles with a floating-point interlock" + }, + { + "EventName": "TRACE_STALL", + "EventCode": "0x80001", + "BriefDescription": "Counts cycles in which the core pipeline is stalled due to backpressure from the Trace Encoder" + } +] diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p650/watchpoint.json b/tools/perf/pmu-events/arch/riscv/sifive/p650/watchpoint.json new file mode 120000 index 000000000000..e88b98bfc5c8 --- /dev/null +++ b/tools/perf/pmu-events/arch/riscv/sifive/p650/watchpoint.json @@ -0,0 +1 @@ +../bullet-07/watchpoint.json \ No newline at end of file