Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp570111rdb; Thu, 2 Nov 2023 11:24:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZZ3sdgNeQNaPJeskfSMIlCK6KldMJDMkF+DfiSSsmhBIavDvPjLtUaLzgpJfqXU+hHjTR X-Received: by 2002:a05:6a00:b55:b0:690:d4f5:c664 with SMTP id p21-20020a056a000b5500b00690d4f5c664mr16939117pfo.11.1698949492273; Thu, 02 Nov 2023 11:24:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698949492; cv=none; d=google.com; s=arc-20160816; b=xwuOup6yo332YOK7j99O8hLoKElRaOk0ZsPqsF+Q2a7in20RSPNM2O6fev2PAywGSq E0i3GOKIin8ZY+EcVtYPD0Lb5AK+VSdMsit16T2kSEyQOskk0jhL17L3Xe51TeRhH1qE HIWN9MDiOfVbEeSX0G9dnky8x/BfN+e1FgPcmWqt6H6+WD2T0mxul+wjgdqGdPkmwRSM 8TB2HDoOb/TORn8NbnzkHHoGwsl/VvOSuYEoeIO5QxUPBvBvN51mrYTdDQfBn4sC7of3 F5hQ8dOXb+gkA3QopoGVrntmOwY+s1RxpTypIuV5hkqbVWfSWTKBbrRzffF/dZ6LvKLE 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=gGrFkmhMC1oEo20BN+P9RczALkt6AOOD+e7AfvLCPzc=; fh=RuLP10lXIWfQfjEWBd9Lr6Yo2F1XT7OucKD7rZJ6j2I=; b=v8kjaQalHfLreFL2LXWO7L1+O9yZWAZYC2E0wAteAWLnEri5/oMNcoKgNyGOEIRpoE YhxrTRgZrMz+C1ynWVkdk+zjlY+9uA7YoSMywkpINwPGnK9RDNBk9OLFgAhARvgXp5c9 TsLRSV6e5J8/P9QI3c2kUE5/1CmtxssHaaJg9MQ2tGoVDKmPS0fUH/YZ4Vd77RTvO6xl USxSP56vHBXQWUY+T6/4Sn0IG2w19l5f1bP65f6mMANZN3aAIbfIhOxcpy0J27/Or5k0 3P5K/Y+B69v2eCd/KiTVdM0SZU2Ql+i2VlgXtMwHlhYWSdFS8SuMi0z2uYbu65arB4i4 v7OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=i0ZubHsE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id be2-20020a656e42000000b005bd043751dcsi76307pgb.855.2023.11.02.11.24.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 11:24:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=i0ZubHsE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C52A68226F5B; Thu, 2 Nov 2023 11:24:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229729AbjKBSYn (ORCPT + 99 others); Thu, 2 Nov 2023 14:24:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjKBSYm (ORCPT ); Thu, 2 Nov 2023 14:24:42 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D0B6DB for ; Thu, 2 Nov 2023 11:24:39 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-54366bb1c02so1761a12.1 for ; Thu, 02 Nov 2023 11:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698949478; x=1699554278; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gGrFkmhMC1oEo20BN+P9RczALkt6AOOD+e7AfvLCPzc=; b=i0ZubHsEdZuFrGmRLClNU2w+9FUdAxxlXi3+ypjZMxibccDAbKUFeGTLS9axjYD9z0 dvixZyCCveeDSo3MkBYF6hntfRPpevmZ8FlzDgoTHFPLJnBwTZjCSEHNIp+GpLh0mCr/ VU1zvdCmDOteFSilEs72bFRIrXb+5lf8H7pMA+vcDr9IJpshMdFDWSHCWA3A7h6r/Qzn aZhSJZwFfDADz5V3w5HLeJV2wQnQcOgazzlQvHxdGMzS+FspvbTukULy3V8bS9sy8d0b ADwdw0hMmRpPrc02KJKVKBISZFRutw9OrXEPMIADdcAX1xzKr/0nnLVi0yUAbiDeqd7k pWZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698949478; x=1699554278; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gGrFkmhMC1oEo20BN+P9RczALkt6AOOD+e7AfvLCPzc=; b=sh1UPTknBuXKuhWmZI7q9UlO7FfPcTv+illr9qbzZp8jkhr7qlxj2mUmP+h3pBQexk wSRpoY9iEiPj+0WDrxnwAXYk8HY09DbSwvVS0QVN5LDsOABMOvWBDk1giuM75T0kEVpP NC2Wg3dn5hINAkcA+4jhix7TqiyH5a4Y7ROpeAvytINbcy3bUvgIW0aN4zTxDMX8QijN +zsuGrth78ZmkVC5QuZpKdFGVKtl+XGOW7r+SqcW5f3hrKqEXFD4HHNf1WS7OcuvsKrH uoeymKu/t8mg7YQG6FxhbKJN9/cVs41LNh0B1NC2K6ozJCtGOcpbTJmTBuicrEfkWR16 WDFA== X-Gm-Message-State: AOJu0Yw7VCkmjlmYwaplNb3gkra0H8TbYJ56aQBDsGjFEnzG2A+nSc0l xGP+6YR0ts0avQpgZWTOS/SVKwLC38MDHo48Si7rYA== X-Received: by 2002:a05:6402:3228:b0:543:fbf7:c70e with SMTP id g40-20020a056402322800b00543fbf7c70emr104719eda.5.1698949477935; Thu, 02 Nov 2023 11:24:37 -0700 (PDT) MIME-Version: 1.0 References: <20231102015447.2526572-1-jisheng.teoh@starfivetech.com> In-Reply-To: <20231102015447.2526572-1-jisheng.teoh@starfivetech.com> From: Ian Rogers Date: Thu, 2 Nov 2023 11:24:24 -0700 Message-ID: Subject: Re: [PATCH] perf vendor events riscv: add StarFive Dubhe-80 JSON file To: Ji Sheng Teoh Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Paul Walmsley , Palmer Dabbelt , Albert Ou , Ley Foon Tan , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Beeman Strong , linux-riscv@lists.infradead.org, n.shubin@yadro.com, kconsul@ventanamicro.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Thu, 02 Nov 2023 11:24:49 -0700 (PDT) On Wed, Nov 1, 2023 at 6:55=E2=80=AFPM Ji Sheng Teoh wrote: > > 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 =3D "riscv,pmu"; > riscv,raw-event-to-mhpmcounters =3D > /* 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/tr= ee/tools/perf/pmu-events/arch/riscv/riscv-sbi-firmware.json?h=3Dperf-tools-= next Perhaps it is worth commenting in the commit message whether or not these events are supported. Thanks, Ian