Re: [PATCH v2 09/12] perf vendor events intel: Add novalake v1.00 events
From: Chun-Tse Shao
Date: Wed Jul 15 2026 - 17:19:21 EST
On Tue, Jul 14, 2026 at 4:29 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
> On Tue, Jul 14, 2026 at 1:40 PM Chun-Tse Shao <ctshao@xxxxxxxxxx> wrote:
> [snip]
> > diff --git a/tools/perf/pmu-events/arch/x86/mapfile.csv b/tools/perf/pmu-events/arch/x86/mapfile.csv
> > index a15cd3280993..7bbb8b237b35 100644
> > --- a/tools/perf/pmu-events/arch/x86/mapfile.csv
> > +++ b/tools/perf/pmu-events/arch/x86/mapfile.csv
> > @@ -39,6 +39,7 @@ GenuineIntel-6-8[CD],v1.19,tigerlake,core
> > GenuineIntel-6-2C,v5,westmereep-dp,core
> > GenuineIntel-6-25,v4,westmereep-sp,core
> > GenuineIntel-6-2F,v4,westmereex,core
> > +GenuineIntel-18-[13],v1.00,novalake,core
>
> I think we should avoid editing the mapfile.csv and just use what
> comes out of create_perf_json.py:
> https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py
> To avoid the strings differing we can modify get_cpuid_str:
> https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/arch/x86/util/header.c#n70
> so that "%s-%u-%X-%X$" is "%s-%u-%02X-%X$" (the values are vendor,
> family, model and stepping with the stepping being optional).
> This ensures the model number is always 2 characters wide, zero-padded
> if necessary. I don't believe this impacts any other x86 cpuid
> strings.
>
> Thanks,
> Ian
For the fix please check:
lore.kernel.org/20260715211144.3144895-1-ctshao@xxxxxxxxxx
Note that the "%02X" model formatting is restricted to GenuineIntel
CPUs. It will break AMD Zen 1 matching because the regex is:
AuthenticAMD-23-([12][0-9A-F]|[0-9A-F]),v2,amdzen1,core
Zero-padding single-digit model 0x01 to "01" causes [0-9A-F] to match
only the leading '0', failing the full string match check and falling
through to misidentify as Zen 2 (AuthenticAMD-23-[[:xdigit:]]+).
Thanks,
CT
>
> > AuthenticAMD-23-([12][0-9A-F]|[0-9A-F]),v2,amdzen1,core
> > AuthenticAMD-23-[[:xdigit:]]+,v1,amdzen2,core
> > AuthenticAMD-25-([245][[:xdigit:]]|[[:xdigit:]]),v1,amdzen3,core
>
> > + "Unit": "cpu_atom"
> > + }
> > +]
> > --
> > 2.55.0.141.g00534a21ce-goog
> >