Skip to contentSkip to conversation

perf trace: Do not show syscall tracepoint filter in the --no-syscalls case

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Aug 6, 2015 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  2e5e5f876143b147b98d0c0854b5fc577412b05b
Gitweb:     http://git.kernel.org/tip/2e5e5f876143b147b98d0c0854b5fc577412b05b
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Mon, 3 Aug 2015 17:12:29 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 5 Aug 2015 10:52:19 -0300

perf trace: Do not show syscall tracepoint filter in the --no-syscalls case

We were accessing trace->syscalls.events members even when that struct wasn't initialized, i.e. --no-syscalls was specified on the command line, fix it to show that, still in debug mode, when we have an event qualifier list, i.e. when we actually are doing subset syscall tracing.

Cc Adrian Hunter <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Milian Wolff <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Stephane Eranian <[email protected]>
Fixes 19867b6186f3 ("perf trace: Use event filters for the event qualifier list")
---
 tools/perf/builtin-trace.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tools/perf/builtin-trace.c +3 -2
index 06cfa93..3cfca93 100644
@@ -2394,9 +2394,10 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
 		err = trace__set_ev_qualifier_filter(trace);
 		if (err < 0)
 			goto out_errno;
-	}
 
-	pr_debug("%s\n", trace->syscalls.events.sys_exit->filter);
+		pr_debug("event qualifier tracepoint filter: %s\n",
+			 trace->syscalls.events.sys_exit->filter);
+	}
 
 	err = perf_evlist__apply_filters(evlist, &evsel);
 	if (err < 0)