summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2023-09-11 10:05:58 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-09-12 17:47:00 -0300
commitf0f4cd1003a03b0ae86be8c9ec8e88b0df384001 (patch)
tree4b6c12719c60750cb38a95f73d501eb0ab2b3cc9
parent1344a7077d78bb2ba72e539fc9119321d98fd06e (diff)
downloadlwn-f0f4cd1003a03b0ae86be8c9ec8e88b0df384001.tar.gz
lwn-f0f4cd1003a03b0ae86be8c9ec8e88b0df384001.zip
perf pmu: Add YYDEBUG
YYDEBUG enables line numbers and other error helpers in the generated pmu-bison.c. Conditionally enabled only for debug builds. Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Gaosheng Cui <cuigaosheng1@huawei.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rob Herring <robh@kernel.org> Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230911170559.4037734-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/pmu.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/pmu.y b/tools/perf/util/pmu.y
index 600c8c158c8e..198907a8a48a 100644
--- a/tools/perf/util/pmu.y
+++ b/tools/perf/util/pmu.y
@@ -5,6 +5,10 @@
%{
+#ifndef NDEBUG
+#define YYDEBUG 1
+#endif
+
#include <linux/compiler.h>
#include <linux/list.h>
#include <linux/bitmap.h>