[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150208141246.GA13586@danjae>
Date: Sun, 8 Feb 2015 23:12:46 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Jiri Olsa <jolsa@...nel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Subject: Re: [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@...dmis.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@...dmis.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;
> }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists