summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-trace.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2016-05-06 04:38:05 +0200
committerArnaldo Carvalho de Melo2016-05-06 13:44:30 +0200
commit4c4d6e519091a3551a0ad2e2e8423d77f3000400 (patch)
tree9574614bfe0cfefff473217baa1ac49643440900 /tools/perf/builtin-trace.c
parentMerge tag 'perf-core-for-mingo-20160505' of git://git.kernel.org/pub/scm/linu... (diff)
downloadkernel-qcow2-linux-4c4d6e519091a3551a0ad2e2e8423d77f3000400.tar.gz
kernel-qcow2-linux-4c4d6e519091a3551a0ad2e2e8423d77f3000400.tar.xz
kernel-qcow2-linux-4c4d6e519091a3551a0ad2e2e8423d77f3000400.zip
perf trace: Do not print raw args list for syscalls with no args
The test to check if the arg format had been read from the syscall:sys_enter_name/format file was looking at the list of non-commom fields, and if that is empty, it would think it had failed to read it, because it doesn't exist, for instance, for the clone() syscall. So instead before dumping the raw syscall args list check IS_ERR(sc->tp_format), if that is true, then an attempt was made to read the format file and failed, in which case dump the raw arg list values. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-ls7pmdqb2xy9339vdburwvnk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r--tools/perf/builtin-trace.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 66aa2a00414b..9d23edc06698 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1606,7 +1606,12 @@ static size_t syscall__scnprintf_args(struct syscall *sc, char *bf, size_t size,
"%ld", val);
}
}
- } else {
+ } else if (IS_ERR(sc->tp_format)) {
+ /*
+ * If we managed to read the tracepoint /format file, then we
+ * may end up not having any args, like with gettid(), so only
+ * print the raw args when we didn't manage to read it.
+ */
int i = 0;
while (i < 6) {