[PATCH 29/57] perf trace: Show error message when not finding a field used in a filter expression

From: Arnaldo Carvalho de Melo
Date: Mon Oct 21 2019 - 09:40:20 EST


From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

It was there, but as pr_debug(), make it pr_err() so that we can see it
without -v:

# trace -e syscalls:*lseek --filter="whenc==SET" sleep 1
"whenc" not found in "syscalls:sys_enter_lseek", can't set filter "whenc==SET"
#

Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Luis ClÃudio GonÃalves <lclaudio@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Link: https://lkml.kernel.org/n/tip-ly4rgm1bto8uwc2itpaixjob@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/builtin-trace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index e71605c99080..cafd18466dfa 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -3611,8 +3611,8 @@ static int trace__expand_filter(struct trace *trace __maybe_unused, struct evsel

fmt = perf_evsel__syscall_arg_fmt(evsel, arg);
if (fmt == NULL) {
- pr_debug("\"%s\" not found in \"%s\", can't set filter \"%s\"\n",
- arg, evsel->name, evsel->filter);
+ pr_err("\"%s\" not found in \"%s\", can't set filter \"%s\"\n",
+ arg, evsel->name, evsel->filter);
return -1;
}

--
2.21.0