perf tools: Make perf aware of tracefs
As tracefs may be mounted instead of debugfs to get to the event directories, have perf know about tracefs, and use that file system over debugfs if it is present. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/20150202193553.340946602@goodmis.org [ Fixed up error messages about tracefs pointed out by Namhyung ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
dd6dda27a8
commit
23773ca18b
9 changed files with 91 additions and 25 deletions
|
@ -18,7 +18,12 @@ int test__open_syscall_event(void)
|
|||
|
||||
evsel = perf_evsel__newtp("syscalls", "sys_enter_open");
|
||||
if (evsel == NULL) {
|
||||
pr_debug("is debugfs mounted on /sys/kernel/debug?\n");
|
||||
if (tracefs_configured())
|
||||
pr_debug("is tracefs mounted on /sys/kernel/tracing?\n");
|
||||
else if (debugfs_configured())
|
||||
pr_debug("is debugfs mounted on /sys/kernel/debug?\n");
|
||||
else
|
||||
pr_debug("Neither tracefs or debugfs is enabled in this kernel\n");
|
||||
goto out_thread_map_delete;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue