aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2023-09-11 10:05:59 -0700
committerArnaldo Carvalho de Melo <[email protected]>2023-09-12 17:50:36 -0300
commit999b81b907ea92fa759e426591068244d9635496 (patch)
tree8bd0a3a86cae3e8868445ffdbc8d9164725fbdb0
parentf0f4cd1003a03b0ae86be8c9ec8e88b0df384001 (diff)
perf bpf-filter: Add YYDEBUG
YYDEBUG enables line numbers and other error helpers in the generated bpf-filter-bison.c. Conditionally enabled only for debug builds. 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/bpf-filter.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/bpf-filter.y b/tools/perf/util/bpf-filter.y
index 5dfa948fc986..0e4d6de3c2ad 100644
--- a/tools/perf/util/bpf-filter.y
+++ b/tools/perf/util/bpf-filter.y
@@ -3,6 +3,10 @@
%{
+#ifndef NDEBUG
+#define YYDEBUG 1
+#endif
+
#include <stdio.h>
#include <string.h>
#include <linux/compiler.h>