linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Jiri Olsa <jolsa@redhat.com>, Mike Galbraith <efault@gmx.de>,
	Namhyung Kim <namhyung@gmail.com>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Stephane Eranian <eranian@google.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH 11/12] perf trace: Print the name of a syscall when failing to read its info
Date: Wed, 24 Oct 2012 19:50:22 -0200	[thread overview]
Message-ID: <1351115423-9025-12-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1351115423-9025-1-git-send-email-acme@infradead.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

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 <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
echo Link: http://lkml.kernel.org/n/tip-`ranpwd -l 24`@git.kernel.org
Link: http://lkml.kernel.org/n/tip-q3ak0j8b81yxylykq5wp2uwi@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-trace.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index fb83cfe..ba05510 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;
 }
 
-- 
1.7.9.2.358.g22243


  parent reply	other threads:[~2012-10-24 21:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-24 21:50 [GIT PULL 00/12] perf/core improvements and fixes Arnaldo Carvalho de Melo
2012-10-24 21:50 ` [PATCH 01/12] perf tools: Diplays more output on features check for make V=1 Arnaldo Carvalho de Melo
2012-10-24 21:50 ` [PATCH 02/12] perf tools: Remove noise in python version feature test Arnaldo Carvalho de Melo
2012-10-24 21:50 ` [PATCH 03/12] perf tools: Try to find cross-built objdump path Arnaldo Carvalho de Melo
2012-10-24 21:50 ` [PATCH 04/12] Account the nr_entries in rblist properly Arnaldo Carvalho de Melo
2012-10-24 21:50 ` [PATCH 05/12] perf tools: Give user better message if precise is not supported Arnaldo Carvalho de Melo
2012-10-24 21:50 ` [PATCH 06/12] perf test: Align the 'Ok'/'FAILED!' test results Arnaldo Carvalho de Melo
2012-10-24 21:50 ` [PATCH 07/12] perf trace: Support interrupted syscalls Arnaldo Carvalho de Melo
2012-10-24 21:50 ` [PATCH 08/12] perf trace: Add an event duration column Arnaldo Carvalho de Melo
2012-10-24 21:50 ` [PATCH 09/12] perf trace: Add duration filter Arnaldo Carvalho de Melo
2012-10-24 21:50 ` [PATCH 10/12] perf tools: Pretty print errno for some more functions Arnaldo Carvalho de Melo
2012-10-24 21:50 ` Arnaldo Carvalho de Melo [this message]
2012-10-24 21:50 ` [PATCH 12/12] perf tools: Try to build Documentation when installing Arnaldo Carvalho de Melo
2012-10-25  2:09   ` Namhyung Kim
2012-10-25  7:43 ` [GIT PULL 00/12] perf/core improvements and fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1351115423-9025-12-git-send-email-acme@infradead.org \
    --to=acme@infradead.org \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@gmail.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).