Commit f11cfc6f authored by Pekka Enberg's avatar Pekka Enberg Committed by Arnaldo Carvalho de Melo

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: default avatarPekka Enberg <penberg@kernel.org>
Acked-by: default avatarIngo Molnar <mingo@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/1381867647-8594-1-git-send-email-penberg@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 243be3dd
...@@ -998,8 +998,10 @@ void print_tracepoint_events(const char *subsys_glob, const char *event_glob, ...@@ -998,8 +998,10 @@ void print_tracepoint_events(const char *subsys_glob, const char *event_glob,
char evt_path[MAXPATHLEN]; char evt_path[MAXPATHLEN];
char dir_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; return;
}
sys_dir = opendir(tracing_events_path); sys_dir = opendir(tracing_events_path);
if (!sys_dir) if (!sys_dir)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment