From 3d88aec0d42eec26b633fb2a473e294a1125bbd7 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Wed, 5 Apr 2023 23:52:23 -0700 Subject: perf pmu: Make parser reentrant By default bison uses global state for compatibility with yacc. Make the parser reentrant so that it may be used in asynchronous and multithreaded situations. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Gaosheng Cui Cc: German Gomez Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sean Christopherson Cc: Suzuki Poulouse Link: https://lore.kernel.org/r/20230406065224.2553640-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/pmu.y | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/perf/util/pmu.y') diff --git a/tools/perf/util/pmu.y b/tools/perf/util/pmu.y index e675d79a0274..dff4e892ac4d 100644 --- a/tools/perf/util/pmu.y +++ b/tools/perf/util/pmu.y @@ -1,6 +1,8 @@ - +%define api.pure full %parse-param {struct list_head *format} %parse-param {char *name} +%parse-param {void *scanner} +%lex-param {void* scanner} %{ @@ -78,6 +80,7 @@ PP_VALUE void perf_pmu_error(struct list_head *list __maybe_unused, char *name __maybe_unused, + void *scanner __maybe_unused, char const *msg __maybe_unused) { } -- cgit v1.2.3