From: Ian Rogers Date: Mon, 11 Sep 2023 17:05:57 +0000 (-0700) Subject: perf expr: Make YYDEBUG dependent on doing a debug build X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1344a7077d78bb2ba72e539fc9119321d98fd06e;p=linux.git perf expr: Make YYDEBUG dependent on doing a debug build YYDEBUG enables line numbers and other error helpers in the generated expr-bison.c. These shouldn't be generated when debugging isn't enabled. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Gaosheng Cui Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Cc: Rob Herring Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230911170559.4037734-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/expr.y b/tools/perf/util/expr.y index 6c93b358cc2d2..e364790babb51 100644 --- a/tools/perf/util/expr.y +++ b/tools/perf/util/expr.y @@ -1,6 +1,8 @@ /* Simple expression parser */ %{ +#ifndef NDEBUG #define YYDEBUG 1 +#endif #include #include #include