Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9820848rwp; Thu, 20 Jul 2023 10:07:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlEki5YJRbFv3icNrHV43Bs2S/4xr1D/7wV7VXFsvAf+Whip6ROTdh/Gb8qvPDc/g26DlIJ0 X-Received: by 2002:a19:6559:0:b0:4fc:3755:37de with SMTP id c25-20020a196559000000b004fc375537demr2359538lfj.3.1689872845093; Thu, 20 Jul 2023 10:07:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689872845; cv=none; d=google.com; s=arc-20160816; b=mzO5sxZzVMxlLidStgd3M0RJkF4i2ke7+svpTItnVDkEQX7Mcvtq9gMUHcHjp43ZvX uT7rJ7xdPRip2H9YYdBv3TT55XyhQPIzHPzOBf7YpZuJ3nGATEDtVE1nrEaTlKoLwM3Q MlHnLPiroJ2UjiZJmwxc1PKBzQflRLdSaLstiAP/ENvsVmLhj7W/76g5JBzSaxq5i0IQ yfZWEAyuljviE9a/s393Iwg1OGeVh0FWfWg0/GA6h/Ae89xB/yk3qqrWiMNUS5f8CKF2 zpGDxlNci2yyoyn9jH6mmwDzuxz9nEzmjvpwMi+5byoNROSmWzIf2ovLHD6vTD7mDRgf nFoA== 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=0YK0KVqgT80x9gtOq8ZA4JrTzkCJPsXRqm4bTuq2qlc=; fh=LAKJWZAx5jfBx+s+0hsy4ZQy929ppgN9oYDyn/aGuSA=; b=vUkY4jKShGZSYQxy6Q1+9JxONUaYoLzs1M10ya6yaYOK+o1JPXfFGR8CM2kpSZVtlE /WZkjEXOkRY72coL4KGv8ui6r1xO3ANshGArNnfIDqacA5JVX+fEhC9sTB0TlTXEbC4w pMoLOquebcs9hfLZnwJV8lg/Y5go/1Gyp0xthvnu0ZZgm2hcQMcw8USmwvB2jOXuLnEx Gu7FpiWP0vjXa20lmwsV+IGXRpsKxgePVlZXbYpvHBIpXj4KPgGVNcyNNyG+diUTEd4P wkFCuw2N0WLDf1Md0TUXwePwOKsC0uWoj5K0t1qDBWlCGpueg7XLUz5zA11y52wEpzpP +2uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=Ux7Aodmv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f18-20020a056402161200b0051e04aeebb4si1062128edv.314.2023.07.20.10.06.53; Thu, 20 Jul 2023 10:07:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=Ux7Aodmv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231373AbjGTPvJ (ORCPT + 99 others); Thu, 20 Jul 2023 11:51:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231812AbjGTPvI (ORCPT ); Thu, 20 Jul 2023 11:51:08 -0400 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08A78FC for ; Thu, 20 Jul 2023 08:51:07 -0700 (PDT) Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-40371070eb7so300821cf.1 for ; Thu, 20 Jul 2023 08:51:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1689868266; x=1690473066; 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=0YK0KVqgT80x9gtOq8ZA4JrTzkCJPsXRqm4bTuq2qlc=; b=Ux7AodmvVSgABqN8P9sESis9DMtsCCYYycRlF3jYnEXnLRqzslfx+efIH3YOOlY0V5 xXMYjhh3QKN5JUMlxLaRoHULgvNR0gdfhl0RsOSpwLan84ipcIZWY9IKLff+elYshUEB dbU/Rq+bMdZ92ziIkBxmO21TQrdVA7M3LDPdqky2fIEDYRhoHWHEiK8ve6udyd4qlKlJ Ja3wf8udsBgNgKWc0BCGqnXey0COz3h6a+M127j54JftWLipcQthgFUTgajCGF44mfhk WNi1MK3PD2N9j4dxU6ZbgdLoM/DOQ3vMco7weu1xBemc9MXM91q6oqPeD7MZDxwXwnq0 QnKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689868266; x=1690473066; 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=0YK0KVqgT80x9gtOq8ZA4JrTzkCJPsXRqm4bTuq2qlc=; b=KK+qJh6M84QItZDAt1Mah+RQvxPUDlSrDpkCSNPFrGlMW0+BpVGKIdudGAVH1Pnb5k 8wj1wsCK+JKTAGm6D+zCHJyTQdTiVqKF4Fz/mmQym9qMVufOS83JNzvGjYAhOFiHdrsJ h6NExXyywm8/rEWStTWmHLqiou5JXOcFlnrc+laA6Uhzg/I5gAw6S+hdLSm87lpipkgy 4Z4UNO6pT9bv3277ETFlgAQGx9nTkGw6JjCU1lCH7WGyuw+mWSOhNPEROozsaq/c9oVM 9imyV/aM/FtJxSwlB/YSYzwQuSsjFcyhwF8Tc7rxG8Duu8P32HBIu9coOcYNYM3EQYmQ G0EQ== X-Gm-Message-State: ABy/qLa7iMHSwJ4Am8aD+kLPpl6jeTsylEzM2W2aRbU1fTMqIrkfizR8 ss77RA1oVDnCXYcYPeunGiHnzHNkxUQBO1fYS7C7NaIMCzdVVOvS3pquMw== X-Received: by 2002:a05:622a:101:b0:3f4:f0fd:fe7e with SMTP id u1-20020a05622a010100b003f4f0fdfe7emr231958qtw.3.1689868266021; Thu, 20 Jul 2023 08:51:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ian Rogers Date: Thu, 20 Jul 2023 08:50:54 -0700 Message-ID: Subject: Re: [PATCH 6/6] perf vendor events amd: Add Zen 4 memory controller events To: Sandipan Das Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, x86@kernel.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, namhyung@kernel.org, adrian.hunter@intel.com, tglx@linutronix.de, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, eranian@google.com, ananth.narayan@amd.com, ravi.bangoria@amd.com, santosh.shukla@amd.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 19, 2023 at 10:23=E2=80=AFPM Sandipan Das wrote: > > On 7/19/2023 9:42 PM, Ian Rogers wrote: > > On Tue, Jul 18, 2023 at 11:58=E2=80=AFPM Sandipan Das wrote: > >> > >> Make the jevents parser aware of the Unified Memory Controller (UMC) P= MU > >> and add events taken from Section 8.2.1 "UMC Performance Monitor Event= s" > >> of the Processor Programming Reference (PPR) for AMD Family 19h Model = 11h > >> processors. The events capture UMC command activity such as CAS, ACTIV= ATE, > >> PRECHARGE etc. while the metrics derive data bus utilization and memor= y > >> bandwidth out of these events. > >> > >> Signed-off-by: Sandipan Das > > > > Acked-by: Ian Rogers > > > >> --- > >> .../arch/x86/amdzen4/memory-controller.json | 101 +++++++++++++++++= + > >> .../arch/x86/amdzen4/recommended.json | 84 +++++++++++++++ > >> tools/perf/pmu-events/jevents.py | 2 + > >> 3 files changed, 187 insertions(+) > >> create mode 100644 tools/perf/pmu-events/arch/x86/amdzen4/memory-cont= roller.json > >> > >> diff --git a/tools/perf/pmu-events/arch/x86/amdzen4/memory-controller.= json b/tools/perf/pmu-events/arch/x86/amdzen4/memory-controller.json > >> new file mode 100644 > >> index 000000000000..55263e5e4f69 > >> --- /dev/null > >> +++ b/tools/perf/pmu-events/arch/x86/amdzen4/memory-controller.json > >> @@ -0,0 +1,101 @@ > >> +[ > >> + { > >> + "EventName": "umc_mem_clk", > >> + "PublicDescription": "Number of memory clock cycles.", > >> + "EventCode": "0x00", > >> + "PerPkg": "1", > >> + "Unit": "UMCPMC" > > > > nit: Why use UMCPMC and then rewrite to amd_umc, why not just use "amd_= umc" ? > > > > I followed the convention that has been historically used for AMD uncore = PMUs e.g. > the "Unit" for amd_df is "DFPMC" and for amd_l3 is "L3PMC". I do agree th= at its > simpler to use the same naming so will change this. If you prefer, I can = send out > a separate patch to change the unit naming for amd_df and amd_l3. Thanks for the explanation. I don't mind but it is nicer to have fewer renames imo. If we get rid of one, perhaps we can get rid of them all? Perhaps merge this and follow up with simplification. Thanks, Ian > - Sandipan >