perf jevents: Fail the build on a key the tables may not carry
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v12 Latest2 patches 2 repliesIn review
- v112 patches 1 replySuperseded
Changes in v12 from the cover letter
- the try/except changes and the sys.exit() are dropped (James)
- the message reads "Unknown keys: [...]"; the test comment says the keys a table may carry, not the keys the generator reads
Patches in v12 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | perf vendor events: Fix misspelled keys in the event tablestools/ tools/ tools/ +1 more | +19 | 1 reply | |
| 2/2 | perf jevents: Fail the build on a key the tables may not carrytools/ tools/ | +76 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Ilkka Koskinen | James Clark |
|---|---|---|
| 1/2 | A-b | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v12 0/2] perf jevents: Fail the build on a key the tables may not carry
v12. James asked for the raise and nothing else, so the try/except plumbing v11 carried is gone: the generator already names the file it was reading and the exception names the keys it did not expect.
What is left is two hunks in jevents.py: _valid_keys, and the check in JsonEvent.__init__ that every event and metric table goes through. (metricgroups.json is a plain dictionary of group names and is not checked.) The test is jevents_bad_key.sh and checks the failing case only.
1/2 is the prerequisite James asked for: the mainline tree carries 19 objects with a key the tables may not carry, so 2/2 cannot land on an unfixed tree. It is the two fixes posted on their own, squashed, so the series stands by itself. The AMD half went into perf-tools-next on 11 November; the arm64 half is acked by Ilkka but not applied. If your tree has both, 2/2 is all that is left; if it has the AMD half only, apply 1/2 with -3 (its AMD hunks are already there) and then 2/2.
Measured on 1/2 + 2/2: the generator run over all architectures, over x86 alone and over arm64 alone exits 0. Putting EvendtName into one AMD table makes the x86 run exit 1, with "Exception processing <path>" on stdout and a traceback ending in "ValueError: Unknown keys: ['EvendtName']".
Changes since v11:
- the try/except changes and the sys.exit() are dropped (James)
- the message reads "Unknown keys: [...]"; the test comment says the keys a table may carry, not the keys the generator reads
TAKANO Mitsuhiro (2):
perf vendor events: Fix misspelled keys in the event tables perf jevents: Fail the build on a key the tables may not carry
.../arch/arm64/ampere/ampereonex/mmu.json | 32 ++++++------ .../pmu-events/arch/x86/amdzen4/cache.json | 2 +- .../arch/x86/amdzen5/load-store.json | 2 +- .../arch/x86/amdzen6/load-store.json | 2 +- tools/perf/pmu-events/jevents.py | 24 +++++++++ tools/perf/tests/shell/jevents_bad_key.sh | 52 +++++++++++++++++++ 6 files changed, 95 insertions(+), 19 deletions(-) create mode 100755 tools/perf/tests/shell/jevents_bad_key.sh
base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
Signature · 1 line
2.53.0