Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp253792rdf; Thu, 2 Nov 2023 22:17:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGAjgs7vFEtglxvPBxf0oMzHFFZBjvjaRrHVmwiSuqPzhWLcGLpqd2SDC1W7wB0WddEHxuv X-Received: by 2002:a05:6e02:310f:b0:359:3ee6:a90f with SMTP id bg15-20020a056e02310f00b003593ee6a90fmr10084360ilb.11.1698988650552; Thu, 02 Nov 2023 22:17:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698988650; cv=none; d=google.com; s=arc-20160816; b=lOtyO0tj3Z6myOdYt8Q/l+9yVVoKh762q26zvwyC16zyG6WZeW9uwdvauYW++XrPv3 H1JGafgVAFpFHzMoCH0k3W1G8Ygr5voZpww7qbNscSm3dCe3XdZ1YL23RUu1ZvC/hPZL /VOQdVH2/JgprFActncgUH9HiguUOy7p3Pl38oLEWLzNgF55B8ngaLjptFEyxTMCUmbN mK/BA2hiuDI3KuyN2HsRndSP11rCRhoN4K6pABiXZnO+4h+4COWS7VY89H4vLto+cWhc jGQtVKIdoddt/gd0R1YRyBtLrZSTYYdE2HkfAZI8o/mRFIIyR+sZN/gvvACsw5ZPkCYg Sd6g== 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; bh=2+S4eMXhdgAcLiqtQwULorgnY+uO1WpdVUY8F7KRXJM=; fh=bbsW4BfO8d+dbevEaS6HuutcmJZB1LU7YCJWqu4rtmw=; b=yiApn/xUkxtBcP7npIZAUn8fWJNsjA+M/gE1Ii+4tySpiHg1CmaFr3g0ZQgEmuSxxP XDnYmEKui/7veLR4KttmZLaGUAdbbSnSzfdNePaGGFfsApp+vSCgCXk2xS8mhXDHagpR c7ON94oBt5SUdNWh4ZLf9UM0Xn8V+SqBX+7kxQqWaMnZZK5i4us0uXpnNlPbitvlvLxn sdg8DZJ4URLzec3VGNhyPd6ZTebRnuf6cWGPb1oUGZ6Q+jQDSHFs8e6FYVylfWnQa4Cr YHvX7j/yFCxgN07fuHIIqPEodyD46ELM7hTBSluHzlRMZuLeQEvj8ZYVK/d9sei2+hU5 GMzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id bx4-20020a056a02050400b005aad5164a45si891725pgb.444.2023.11.02.22.17.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 22:17:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id AD95A8242F7E; Thu, 2 Nov 2023 22:17:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229611AbjKCFRR convert rfc822-to-8bit (ORCPT + 99 others); Fri, 3 Nov 2023 01:17:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjKCFRQ (ORCPT ); Fri, 3 Nov 2023 01:17:16 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E737BD; Thu, 2 Nov 2023 22:17:10 -0700 (PDT) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id E53DB24E288; Fri, 3 Nov 2023 13:17:02 +0800 (CST) Received: from EXMBX172.cuchost.com (172.16.6.92) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 3 Nov 2023 13:17:02 +0800 Received: from localhost.localdomain (202.188.176.82) by EXMBX172.cuchost.com (172.16.6.92) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 3 Nov 2023 13:16:56 +0800 From: Ji Sheng Teoh To: CC: , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH] perf vendor events riscv: add StarFive Dubhe-80 JSON file Date: Fri, 3 Nov 2023 13:15:30 +0800 Message-ID: <20231103051530.912669-1-jisheng.teoh@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.188.176.82] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX172.cuchost.com (172.16.6.92) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 02 Nov 2023 22:17:27 -0700 (PDT) >> >> StarFive's Dubhe-80 supports raw event id 0x00 - 0x22. >> The raw events are enabled through PMU node of DT binding. >> >> Example of PMU DT node: >> pmu { >> compatible = "riscv,pmu"; >> riscv,raw-event-to-mhpmcounters = >> /* Event ID 1-31 */ >> <0x00 0x00 0xFFFFFFFF 0xFFFFFFE0 0x00007FF8>, >> /* Event ID 32-33 */ >> <0x00 0x20 0xFFFFFFFF 0xFFFFFFFE 0x00007FF8>, >> /* Event ID 34 */ >> <0x00 0x22 0xFFFFFFFF 0xFFFFFF22 0x00007FF8>; >> }; >> >> Example of Perf stat output: >> [root@user]# perf stat -a \ >> -e access_mmu_stlb \ >> -e miss_mmu_stlb \ >> -e access_mmu_pte_c \ >> -e rob_flush \ >> -e btb_prediction_miss \ >> -e itlb_miss \ >> -e sync_del_fetch_g \ >> -e icache_miss \ >> -e bpu_br_retire \ >> -e bpu_br_miss \ >> -e ret_ins_retire \ >> -e ret_ins_miss \ >> -- openssl speed rsa2048 >> >> Doing 2048 bits private rsa's for 10s: 39 2048 bits private RSA's in >> 10.14s >> Doing 2048 bits public rsa's for 10s: 1563 2048 bits public RSA's in >> 10.00s >> version: 3.0.11 >> built on: Tue Sep 19 13:02:31 2023 UTC >> options: bn(64,64) >> CPUINFO: N/A >> sign verify sign/s verify/s >> rsa 2048 bits 0.260000s 0.006398s 3.8 156.3 >> >> Performance counter stats for 'system wide': >> >> 1338350 access_mmu_stlb >> 1154025 miss_mmu_stlb >> 1162691 access_mmu_pte_c >> 34067 rob_flush >> 11212384 btb_prediction_miss >> 1256242 itlb_miss >> 652523491 sync_del_fetch_g >> 384465 icache_miss >> 64635789 bpu_br_retire >> 323440 bpu_br_miss >> 8785143 ret_ins_retire >> 31236 ret_ins_miss >> >> 20.760822480 seconds time elapsed >> >> Signed-off-by: Ji Sheng Teoh > > Thanks Ji Sheng, > > in adding these events for this new architecture is there a reason not > to add the architecture standard events in > tools/perf/pmu-events/arch/riscv/riscv-sbi-firmware.json ? > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/pmu-events/arch/riscv/riscv-sbi-firmware.json?h=perf-tools-next > > Perhaps it is worth commenting in the commit message whether or not > these events are supported. > > Thanks, > Ian Thanks Ian for the comment, The architecture standard events are supported as well. I will include them in v2. Thanks, Ji Sheng