diff options
author | Arnaldo Carvalho de Melo <[email protected]> | 2012-10-24 18:44:13 -0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2012-10-24 18:44:13 -0200 |
commit | 814d7a4d2c33657489f7b45bc0b2dcaa0d88edc0 (patch) | |
tree | 2ccaea4e18d2f3fdb407faf77ff6d0d45f2c068c | |
parent | 8b745263d93470a6ab4528088a26e5cd3dfe7bf6 (diff) |
perf trace: Print the name of a syscall when failing to read its info
When failing to read the tracepoint event format, like currently with
sys_execve, that is not defined via SYSCALL_DEFINE macros and thus
doesn't have an entry in:
$ ls -d /sys/kernel/debug/tracing/events/syscalls/sys_enter_*exec*
/sys/kernel/debug/tracing/events/syscalls/sys_enter_kexec_load
$
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Thomas Gleixner <[email protected]>
echo Link: http://lkml.kernel.org/n/tip-`ranpwd -l 24`@git.kernel.org
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/builtin-trace.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index fb83cfe472e3..ba055103b525 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -278,7 +278,10 @@ static struct syscall *trace__syscall_info(struct trace *trace, return &trace->syscalls.table[id]; out_cant_read: - printf("Problems reading syscall %d information\n", id); + printf("Problems reading syscall %d", id); + if (id <= trace->syscalls.max && trace->syscalls.table[id].name != NULL) + printf("(%s)", trace->syscalls.table[id].name); + puts(" information"); return NULL; } |