From: Ian Rogers Date: Fri, 1 May 2020 17:33:28 +0000 (-0700) Subject: perf expr: Debug lex if debugging yacc X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e5e0e63528f2d302c8190fc909baf97f250acb70;p=linux.git perf expr: Debug lex if debugging yacc Only effects parser debugging (disabled by default). Enables displaying '--accepting rule at line .. ("..."). Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Haiyan Song Cc: Jin Yao Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200501173333.227162-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/expr.c b/tools/perf/util/expr.c index aa631e37ad1e8..8b4ce704a68d9 100644 --- a/tools/perf/util/expr.c +++ b/tools/perf/util/expr.c @@ -45,6 +45,7 @@ __expr__parse(double *val, struct expr_parse_ctx *ctx, const char *expr, #ifdef PARSER_DEBUG expr_debug = 1; + expr_set_debug(1, scanner); #endif ret = expr_parse(val, ctx, scanner);