Skip to contentSkip to conversation

perf trace: Show error message when not finding a field used in a filter expression

tip: perf/core tip-bot2 for Arnaldo Carvalho de Melo 1 participant 1 message Oct 22, 2019 1 message not in the archive perf events

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

tip-bot2 for Arnaldo Carvalho de Melo

author merge bot Applied
#1 lore raw

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     3cdc8db91e0e73f94fa6ce3bf966b0152ccf0107
Gitweb:        https://git.kernel.org/tip/3cdc8db91e0e73f94fa6ce3bf966b0152ccf0107
Author:        Arnaldo Carvalho de Melo <[email protected]>
AuthorDate:    Thu, 17 Oct 2019 16:41:34 -03:00
Committer:     Arnaldo Carvalho de Melo <[email protected]>
CommitterDate: Thu, 17 Oct 2019 17:26:35 -03:00

perf trace: Show error message when not finding a field used in a filter expression

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"
  #
---
 tools/perf/builtin-trace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/builtin-trace.c +2 -2
index e71605c..cafd184 100644
@@ -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;
 			}