aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2023-09-11 10:05:56 -0700
committerArnaldo Carvalho de Melo <[email protected]>2023-09-12 17:46:16 -0300
commitd4ce60190e08d84f88937019defa5e3d23409ac1 (patch)
tree6087248afcc092cb2e62828efdd26efdda48b64f
parentdc2cfef9a9afe04a1b7683a999065b544d7b54f7 (diff)
perf parse-events: Make YYDEBUG dependent on doing a debug build
YYDEBUG enables line numbers and other error helpers in the generated parse-events-bison.c. These shouldn't be generated when debugging isn't enabled. Signed-off-by: Ian Rogers <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Gaosheng Cui <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Clark <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rob Herring <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/util/parse-events.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index dcadf08f840a..c4ce888a2550 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -6,7 +6,9 @@
%{
+#ifndef NDEBUG
#define YYDEBUG 1
+#endif
#include <errno.h>
#include <linux/compiler.h>