perf jevents: Raise exception for no definition of a arch std event
authorJohn Garry <john.g.garry@oracle.com>
Mon, 7 Aug 2023 11:16:31 +0000 (11:16 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 21 Aug 2023 12:57:05 +0000 (09:57 -0300)
commit7298e876075eea8d2e782bf846ab0b4721afac92
tree4c5b50abe5e22929030cae9c3ae12c672cdd3cec
parent64917f4df048a0649ea7901c2321f020e71e6f24
perf jevents: Raise exception for no definition of a arch std event

Recently Ilkka reported that the JSONs for the AmpereOne arm64-based
platform included a dud event which referenced a non-existent arch std
event [0].

Previously in the times of jevents.c, we would raise an exception for this.

This is still invalid, even though the current code just ignores such an
event.

Re-introduce code to raise an exception for when no definition exists to
help catch as many invalid JSONs as possible.

[0] https://lore.kernel.org/linux-perf-users/9e851e2a-26c7-ba78-cb20-be4337b2916a@oracle.com/

Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Link: https://lore.kernel.org/r/20230807111631.3033102-1-john.g.garry@oracle.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/pmu-events/jevents.py