lkml.org 
[lkml]   [2015]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/6 v2] perf: Make perf aware of tracefs
Hi Steve,

On Mon, Feb 02, 2015 at 02:35:07PM -0500, Steven Rostedt wrote:
> From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
>
> 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>
> ---
> tools/perf/tests/open-syscall-all-cpus.c | 7 +++-
> tools/perf/tests/open-syscall.c | 7 +++-
> tools/perf/tests/parse-events.c | 13 +++++--
> tools/perf/util/cache.h | 1 +
> tools/perf/util/evlist.c | 1 -
> tools/perf/util/parse-events.h | 2 +-
> tools/perf/util/probe-event.c | 24 ++++++++-----
> tools/perf/util/util.c | 60 ++++++++++++++++++++++++++------
> tools/perf/util/util.h | 1 +
> 9 files changed, 91 insertions(+), 25 deletions(-)
>
> diff --git a/tools/perf/tests/open-syscall-all-cpus.c b/tools/perf/tests/open-syscall-all-cpus.c
> index 8fa82d1700c7..21969e99ea46 100644
> --- a/tools/perf/tests/open-syscall-all-cpus.c
> +++ b/tools/perf/tests/open-syscall-all-cpus.c
> @@ -29,7 +29,12 @@ int test__open_syscall_event_on_all_cpus(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/debug?\n");

Shouldn't it be /sys/kernel/tracing/ ?


> + 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;
> }
>
> diff --git a/tools/perf/tests/open-syscall.c b/tools/perf/tests/open-syscall.c
> index a33b2daae40f..4250e40234d2 100644
> --- a/tools/perf/tests/open-syscall.c
> +++ b/tools/perf/tests/open-syscall.c
> @@ -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/debug?\n");

Ditto.

Thanks,
Namhyung


> + 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;
> }


\
 
 \ /
  Last update: 2015-02-08 15:21    [W:0.125 / U:4.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site