[PATCH v1 00/13] parse-events clean up
From: Ian Rogers
Date: Tue Jun 27 2023 - 00:35:28 EST
Remove some tokens the lexer never produces. Ensure abort paths set an
error. Previously scanning all PMUs meant bad events could fail with
an invalid token, detect this at the point parsing for a PMU fails and
add error strings. Try to be consistent in using YYNOMEM for memory
failures and YYABORT for bad input.
Ian Rogers (13):
perf parse-events: Remove unused PE_PMU_EVENT_FAKE token
perf parse-events: Remove unused PE_KERNEL_PMU_EVENT token
perf parse-events: Remove two unused tokens
perf parse-events: Add more comments to parse_events_state
perf parse-events: Avoid regrouped warning for wild card events
perf parse-event: Add memory allocation test for name terms
perf parse-events: Separate YYABORT and YYNOMEM cases
perf parse-events: Move instances of YYABORT to YYNOMEM
perf parse-events: Separate ENOMEM memory handling
perf parse-events: Additional error reporting
perf parse-events: Populate error column for BPF events
perf parse-events: Improve location for add pmu
perf parse-events: Remove ABORT_ON
tools/perf/tests/bpf.c | 2 +-
tools/perf/util/parse-events.c | 95 +++++----
tools/perf/util/parse-events.h | 20 +-
tools/perf/util/parse-events.y | 351 +++++++++++++++++----------------
4 files changed, 256 insertions(+), 212 deletions(-)
--
2.41.0.162.gfafddb0af9-goog