Re: [PATCH] perf vendor events arm64 AmpereOneX: Fix misspelled PublicDescription keys
From: TAKANO Mitsuhiro
Date: Fri Nov 13 2026 - 03:29:37 EST
On 2026-11-11 14:03, James Clark wrote:
> The linked patches seem like a bigger change than what I'd expect. I'm
> not sure that's necessary for something conceptually as simple as
> "validate the json files".
Agreed, and that version is gone. What is posted now is one patch: the
list of keys a table may carry, and a walk that reports the ones it does
not. No schema, no similarity, no metric-name check, nothing wired into
the build.
https://lore.kernel.org/linux-perf-users/20261113032927.634183-1-takano32@xxxxxxxxx/
> I'm also a bit lost about the relationship between "[PATCH 0/3] perf
> jevents: Report the JSON keys that jevents.py never reads" and "[PATCH]
> perf jevents: Check the JSON keys that jevents.py never reads".
The 0/3 was the first posting, and it had collected two unrelated changes
on the way - a report for a metric expression with no event behind it, and
making the arch argument optional. Both are dropped. Since v7 it is a
single patch, and the only thing it does is the key check.
> Even without jsonschema I can't see why a validator can't be written in
> less than 10 lines.
It can, and that is what v10 is. The check itself is
for path in sorted(Path(root).rglob('*.json')):
if path.name.endswith('metricgroups.json'):
continue
for obj in json.loads(path.read_text(encoding='utf-8')):
if extra := set(obj) - _TABLE_KEYS:
print(f'{path}: {sorted(extra)}')
bad += 1
plus a directory check, the 51-word list, and a shell test that feeds it a
known key and a bad one. On today's tree it reports 19 keys in four
tables.
My earlier answer to this went into the other thread by mistake (wrong
In-Reply-To), which is why this one looked unanswered.
This thread is the data half: the 16 keys in ampereonex/mmu.json and the 3
in the AMD tables are still in the tree, so the check reports them today.
I can post the corrected table as a v2 whenever you want it - the check is
not a prerequisite for it.
Written with Hermes Agent, an LLM assistant; the author reviewed it and ran
the checks it describes.