perf parse-event: Add memory allocation test for name terms
authorIan Rogers <irogers@google.com>
Tue, 27 Jun 2023 18:10:23 +0000 (11:10 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 28 Jul 2023 22:01:16 +0000 (19:01 -0300)
commit9462e4de62755c85867991a4beccff15377d0e95
treee3418d94f1d897ba32532fe0f9cefa9fe10388af
parent88cc47e24597971b05b6e94c28a2fc81d2a8d61a
perf parse-event: Add memory allocation test for name terms

If the name memory allocation fails then propagate to the parser.

Committer notes:

Use $(BISON_FALLBACK_FLAGS) on the bison call so that we continue
building with older bison versions, before 3.81, where YYNOMEM isn't
present.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: bpf@vger.kernel.org
Link: https://lore.kernel.org/r/20230627181030.95608-7-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/Build
tools/perf/util/parse-events.c
tools/perf/util/parse-events.y