Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
perf list: Show error if tracepoints not available
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Cc: Ingo Molnar <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
penberg authored and acmel committed Oct 21, 2013
1 parent 243be3d commit f11cfc6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/perf/util/parse-events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f11cfc6

Please sign in to comment.