From: Peter Zijlstra <peterz@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Chris Mason <chris.mason@oracle.com>,
lkml <linux-kernel@vger.kernel.org>,
Jason Baron <jbaron@redhat.com>
Subject: [PATCH] perf: Don't list tracepoints without an id
Date: Wed, 05 Aug 2009 21:23:49 +0200 [thread overview]
Message-ID: <1249500229.5890.10.camel@laptop> (raw)
In-Reply-To: <1249497664.5890.4.camel@laptop>
Stop perf list from displaying tracepoints without an id file.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
tools/perf/util/parse-events.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 7bdad8d..d00636b 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -568,6 +568,7 @@ static void print_tracepoint_events(void)
struct dirent *sys_next, *evt_next, sys_dirent, evt_dirent;
struct stat st;
char evt_path[MAXPATHLEN];
+ int fd;
if (valid_debugfs_mount(debugfs_path))
return;
@@ -582,6 +583,15 @@ static void print_tracepoint_events(void)
goto cleanup;
for_each_event(sys_dirent, evt_dir, evt_dirent, evt_next,
evt_path, st) {
+
+ snprintf(evt_path, MAXPATHLEN, "%s/%s/%s/id",
+ debugfs_path,
+ sys_dirent.d_name, evt_dirent.d_name);
+ fd = open(evt_path, O_RDONLY);
+ if (fd < 0)
+ continue;
+ close(fd);
+
snprintf(evt_path, MAXPATHLEN, "%s:%s",
sys_dirent.d_name, evt_dirent.d_name);
fprintf(stderr, " %-40s [%s]\n", evt_path,
next prev parent reply other threads:[~2009-08-05 19:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-05 18:41 [PATCH] ftrace: fix perf-tracepoint OOPS Peter Zijlstra
2009-08-05 18:48 ` [tip:perfcounters/urgent] ftrace: Fix " tip-bot for Peter Zijlstra
2009-08-05 18:53 ` [PATCH] ftrace: fix " Steven Rostedt
2009-08-05 19:23 ` Peter Zijlstra [this message]
2009-08-05 20:07 ` [PATCH] perf: Don't list tracepoints without an id Jason Baron
2009-08-06 14:48 ` [PATCH -v2] " Peter Zijlstra
2009-08-06 19:33 ` Jason Baron
2009-08-07 11:12 ` [tip:perfcounters/urgent] " tip-bot for Peter Zijlstra
2009-08-06 4:27 ` [tip:perfcounters/urgent] ftrace: Fix perf-tracepoint OOPS tip-bot for Peter Zijlstra
2009-08-06 9:11 ` Peter Zijlstra
2009-08-06 12:38 ` 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=1249500229.5890.10.camel@laptop \
--to=peterz@infradead.org \
--cc=chris.mason@oracle.com \
--cc=jbaron@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.