From: sashiko-bot@kernel.org
To: "Chun-Tse Shao" <ctshao@google.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v1 1/3] perf vendor events intel: Add diamondrapids v1.00 events
Date: Wed, 18 Nov 2026 21:41:28 +0000 [thread overview]
Message-ID: <sashiko-outbox-222021@kernel.org> (raw)
In-Reply-To: <20261118212655.2262601-2-ctshao@google.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] perf vendor events intel: diamondrapids CBOX unit mismatches
kernel cbo PMU
- [Medium] perf vendor events intel: diamondrapids CXLCM 12-bit UMask
overflows 8-bit format
--
commit 3a4a08558cf9b749c6a1a772aa40a0eb0daa9bf9
Author: Chun-Tse Shao <ctshao@google.com>
perf vendor events intel: Add diamondrapids v1.00 events
This commit adds the v1.00 core and uncore PMU event JSON definitions and
mapfile entry for Intel Diamond Rapids.
> diff --git a/tools/perf/pmu-events/arch/x86/diamondrapids/uncore-cache.json b/tools/perf/pmu-events/arch/x86/diamondrapids/uncore-cache.json
> new file mode 100644
> index 0000000000000..c657163f21f71
> --- /dev/null
> +++ b/tools/perf/pmu-events/arch/x86/diamondrapids/uncore-cache.json
> @@ -0,0 +1,292 @@
> +[
> + {
> + "BriefDescription": "LLC Lookup request that access cache and hit the LLC with the CRD opcode",
> + "Counter": "0,1,2,3",
> + "EventCode": "0x34",
> + "EventName": "UNC_CBO_CACHE_LOOKUP.HIT_CRD",
> + "PerPkg": "1",
> + "PublicDescription": "UNC_CBO_CACHE_LOOKUP.HIT_CRD",
> + "UMask": "0xc0a00f7",
> + "Unit": "CBOX"
> + },
[Severity: Medium]
Will the UNC_CBO_* events in uncore-cache.json (and the CBOX entry in
counter.json) match the kernel's Diamond Rapids CBO PMUs at runtime?
jevents.py converts Unit "CBOX" (and "CBO") into pmu_name "uncore_cbox",
whereas the kernel registers Diamond Rapids CBO PMUs as "uncore_cbo_<N>":
arch/x86/events/intel/uncore_snbep.c:
static struct intel_uncore_type dmr_uncore_cbo = {
.name = "cbo",
When perf matches "uncore_cbo_<N>" against "uncore_cbox" in
perf_pmu__match_wildcard_uncore() -> perf_pmu__match_wildcard(),
strncmp("cbo_0", "cbox", 4) fails, so none of the 29 UNC_CBO_* events are
available on Diamond Rapids.
> diff --git a/tools/perf/pmu-events/arch/x86/diamondrapids/uncore-cxl.json b/tools/perf/pmu-events/arch/x86/diamondrapids/uncore-cxl.json
> new file mode 100644
> index 0000000000000..b692606bcd63d
> --- /dev/null
> +++ b/tools/perf/pmu-events/arch/x86/diamondrapids/uncore-cxl.json
> @@ -0,0 +1,22 @@
> +[
> + {
> + "BriefDescription": "Number of Allocation to Mem Data Packing buffer",
> + "Counter": "4,5,6,7",
> + "EventCode": "0x41",
> + "EventName": "UNC_CXLCM_RX_PACK_BUF_INSERTS.MEM_DATA",
> + "PerPkg": "1",
> + "PublicDescription": "UNC_CXLCM_RX_PACK_BUF_INSERTS.MEM_DATA",
> + "UMask": "0xf10",
> + "Unit": "CXLCM"
> + },
> + {
> + "BriefDescription": "Number of Allocation to Mem Data Packing buffer",
> + "Counter": "0,1,2,3",
> + "EventCode": "0x02",
> + "EventName": "UNC_CXLCM_TX_PACK_BUF_INSERTS.MEM_DATA",
> + "PerPkg": "1",
> + "PublicDescription": "UNC_CXLCM_TX_PACK_BUF_INSERTS.MEM_DATA",
> + "UMask": "0xf10",
> + "Unit": "CXLCM"
> + }
> +]
[Severity: Medium]
Can uncore_cxlcm parse a 12-bit UMask of "0xf10"?
The kernel's Diamond Rapids CXLCM PMU defines format/umask via
format_attr_umask (config:8-15, max 255) and exposes bits 32-35 as a
separate format/port_en attribute:
arch/x86/events/intel/uncore_snbep.c:
static struct attribute *dmr_cxlcm_uncore_formats_attr[] = {
&format_attr_event.attr,
&format_attr_umask.attr,
&format_attr_edge.attr,
&format_attr_inv2.attr,
&format_attr_thresh9_2.attr,
&format_attr_port_en.attr,
NULL,
};
Because jevents.py emits umask=0xf10 (3856), pmu_config_term() rejects both
UNC_CXLCM_* events with -EINVAL for exceeding the 8-bit umask maximum of
255.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261118212655.2262601-1-ctshao@google.com?part=1
next prev parent reply other threads:[~2026-11-18 21:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 21:26 [PATCH v1 0/3] perf vendor events intel: update Chun-Tse Shao
2026-11-18 21:26 ` [PATCH v1 1/3] perf vendor events intel: Add diamondrapids v1.00 events Chun-Tse Shao
2026-11-18 21:41 ` sashiko-bot [this message]
2026-11-18 21:26 ` [PATCH v1 2/3] perf vendor events intel: Update lunarlake events from 1.26 to 1.27 Chun-Tse Shao
2026-11-18 21:29 ` sashiko-bot
2026-11-18 21:26 ` [PATCH v1 3/3] perf vendor events intel: Update novalake events from 1.04 to 1.05 Chun-Tse Shao
2026-11-18 21:30 ` sashiko-bot
2026-11-19 1:12 ` [PATCH v1 0/3] perf vendor events intel: update Mi, Dapeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-222021@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ctshao@google.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox