]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
perf trace: Hide sys_exit messages about syscall id = -1
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 22 Aug 2013 20:55:25 +0000 (17:55 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 26 Aug 2013 20:25:45 +0000 (17:25 -0300)
That was reproduced via ftrace as described in this cset comment log,
need to investigate further.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-n1i3m0vo6mgq3ddjj95sls2s@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c

index c907e7e41a74bddc81932785ed5e217165fda1b3..c3caabbe18fabe23352e861be849ac532c6140a5 100644 (file)
@@ -298,7 +298,22 @@ static struct syscall *trace__syscall_info(struct trace *trace,
        int id = perf_evsel__intval(evsel, sample, "id");
 
        if (id < 0) {
-               fprintf(trace->output, "Invalid syscall %d id, skipping...\n", id);
+
+               /*
+                * XXX: Noticed on x86_64, reproduced as far back as 3.0.36, haven't tried
+                * before that, leaving at a higher verbosity level till that is
+                * explained. Reproduced with plain ftrace with:
+                *
+                * echo 1 > /t/events/raw_syscalls/sys_exit/enable
+                * grep "NR -1 " /t/trace_pipe
+                *
+                * After generating some load on the machine.
+                */
+               if (verbose > 1) {
+                       static u64 n;
+                       fprintf(trace->output, "Invalid syscall %d id, skipping (%s, %" PRIu64 ") ...\n",
+                               id, perf_evsel__name(evsel), ++n);
+               }
                return NULL;
        }