[PATCH v8 0/1] perf jevents: Check the keys of the JSON tables
From: TAKANO Mitsuhiro
Date: Thu Nov 12 2026 - 12:40:25 EST
v8 of the check. Two things the review found are fixed, and one is left
alone on purpose.
- --check takes the directory to check as its own argument, so it no
longer needs the arch and model the generator takes. The test calls
"jevents.py --check <dir>" and nothing else.
- the test takes the interpreter from PYTHON (python3 by default) and
exits 2 when it is not there, the same way it does when the generator
is not installed.
The check itself is unchanged: walk, set difference against the list of 51
keys, print the file that carries the bad key, exit 1. On today's tree it
reports 19 keys in four tables:
arch/arm64/ampere/ampereonex/mmu.json PublicDescrition 16 objects
arch/x86/amdzen4/cache.json BriefDescript6ion 1 object
arch/x86/amdzen5/load-store.json BriefDescript6ion 1 object
arch/x86/amdzen6/load-store.json BriefDescript6ion 1 object
The third point was that the test checks a temporary table and never the
tables in the tree, so a misspelling could come back unnoticed. That is
right, and it cannot be added yet: the tree still carries the two
misspellings above, and a test that fails as soon as it lands is not one
anyone wants. Once the patches that fix them are in, the test can run
against the tree as well - I would rather add that as a second step than
bake a list of known-bad files into the test now.
Changes since v7:
- --check takes the directory itself; arch and model are not needed
- the test uses PYTHON and exits 2 when the interpreter is missing
TAKANO Mitsuhiro (1):
perf jevents: Check the keys of the JSON tables
tools/perf/pmu-events/jevents.py | 41 +++++++++++++++++++++++++
tools/perf/tests/shell/jevents_check.sh | 29 +++++++++++++++++
2 files changed, 70 insertions(+)
create mode 100755 tools/perf/tests/shell/jevents_check.sh
base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
--
2.53.0