summaryrefslogtreecommitdiff
path: root/tools/perf
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2023-09-11 10:05:57 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-09-12 17:46:50 -0300
commit1344a7077d78bb2ba72e539fc9119321d98fd06e (patch)
treebdc73e33a31f46c19a7823ea39dd888201974b22 /tools/perf
parentd4ce60190e08d84f88937019defa5e3d23409ac1 (diff)
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 <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-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/expr.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/expr.y b/tools/perf/util/expr.y
index 6c93b358cc2d..e364790babb5 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 <assert.h>
#include <math.h>
#include <stdlib.h>