diff options
author | Pekka Enberg <penberg@kernel.org> | 2013-10-15 23:07:27 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-10-21 17:33:22 -0300 |
commit | f11cfc6f294dbd83b0d58037404df2bd16066238 (patch) | |
tree | fd157c36e6cd7a75bb4ccf005de5fc44900ae864 | |
parent | 243be3dd7c14454899e51334a6d66d29a41ae6ab (diff) | |
download | blackbird-op-linux-f11cfc6f294dbd83b0d58037404df2bd16066238.tar.gz blackbird-op-linux-f11cfc6f294dbd83b0d58037404df2bd16066238.zip |
perf list: Show error if tracepoints not available
Tracepoints are not visible in "perf list" on Fedora 19 because regular
users have no permission to /sys/kernel/debug by default. Show an error
message so that the user knows about it instead of assuming that
tracepoints are not supported on the system.
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/1381867647-8594-1-git-send-email-penberg@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/util/parse-events.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 98125319b158..c90e55cf7e82 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -998,8 +998,10 @@ void print_tracepoint_events(const char *subsys_glob, const char *event_glob, char evt_path[MAXPATHLEN]; char dir_path[MAXPATHLEN]; - if (debugfs_valid_mountpoint(tracing_events_path)) + if (debugfs_valid_mountpoint(tracing_events_path)) { + printf(" [ Tracepoints not available: %s ]\n", strerror(errno)); return; + } sys_dir = opendir(tracing_events_path); if (!sys_dir) |